Effacer les filtres
Effacer les filtres

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?

4 vues (au cours des 30 derniers jours)
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);

Réponses (1)

Mischa Kim
Mischa Kim le 24 Avr 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.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by