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?

3 views (last 30 days)
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);

Answers (1)

Mischa Kim
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.

Categories

Find more on 2-D and 3-D Plots 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!