How do create a function to plot an output projectile motion wth inputs x0,y0,v0x&v0y? x accleration =0,y accleration,g=9.81. using time vector to denote time and two vectors to denote movement x &y direction?
6 views (last 30 days)
Show older comments
angle=[0.4, 0.6, pi/4, 1.0, 1.2]; x0=0; y0=0; v0x=0; v0y=0 g=9.81 t=0:.01:500;
x=V0x*cos(angle); y=V0y*sin(angle)-9.8*t; plot(x,y);
0 Comments
Answers (1)
Mischa Kim
on 24 Apr 2015
Yeap, I believe you are trying to do something like
x0 = 0;
y0 = 0;
v0 = 10;
angle0 = pi/3;
g = 9.81;
t = 0:.01:3;
x = x0 + v0*cos(angle0)*t;
y = y0 + v0*sin(angle0)*t - g*t.^2/2;
plot(x,y);
v0x and v0y are determined by v0 and the launch angle.
0 Comments
See Also
Categories
Find more on General Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!