フィルターのクリア

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 ビュー (過去 30 日間)
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);

回答 (1 件)

Mischa Kim
Mischa Kim 2015 年 4 月 24 日
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.

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by