How do i plot projectile motion given initial velocity, initial horizontal position, initial vertical position & angle of inclination?

조회 수: 21 (최근 30일)
Any help would highly be appreciated.
  댓글 수: 2
Jan
Jan 2018년 10월 18일
You need to calculate the trajectory and plot it. Please post, what you have tried so far.
Ali Almoayed
Ali Almoayed 2018년 10월 18일
x=input('Enter initial horizontal position= ');
y=input('Enter initial vertical position= ');
th=input('Enter angle of projection in degrees= ');
v=input('Enter velocity of projection= ');
g=9.81;
t=0:0.05:100;
maximum_height=(v.^2.*sind(th).^2)./(2.*g);
fprintf('a) maximum_height: %d\n',maximum_height)
horizontal_range=(v.^2.*sind(th).*2)./g;
fprintf('b)horizontal_range: %d\n',horizontal_range)
horizontal_position=v.*cosd(th);
fprintf(' horizontal_position= %d\n',horizontal_position)
I couldn't reach to a function to plot the projectile motion

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2018년 10월 18일
See my attached projectile demo. Computes just about everything you could want. Adapt as needed.

madhan ravi
madhan ravi 2018년 10월 18일

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by