Hello there,
So I'm trying to graph the traajectory of an object based on the user input (initial height, angle of elivation, initial velocity of object...etc)
I got kinda stuck and would really appreaciate any help or advice.
Thanks,
Ben N.

2 件のコメント

James Tursa
James Tursa 2020 年 11 月 16 日
What have you done so far? What specific problems are you having with your code?
Benjamin Nienhouse
Benjamin Nienhouse 2020 年 11 月 16 日
I was just having a problem figuring out hte equation, it's been a while since physics.

サインインしてコメントする。

 採用された回答

David Hill
David Hill 2020 年 11 月 16 日

0 投票

If you have the equations and don't have to process any differential equations it is as easy as:
t=0:.01:14;%seconds
height=10;%meters
angle=45;
v=100;%m/s
a=-9.81;%m/s^2
y=@(t).5*a*t.^2+v*sind(angle)*t+height;
x=@(t)v*cosd(angle)*t;
plot(x(t),y(t));

1 件のコメント

Benjamin Nienhouse
Benjamin Nienhouse 2020 年 11 月 16 日
Clutch bro, thx

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および 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