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

Any help would highly be appreciated.

2 Commenti

You need to calculate the trajectory and plot it. Please post, what you have tried so far.
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

Accedi per commentare.

Risposte (2)

Categorie

Scopri di più su Language Fundamentals in Centro assistenza e File Exchange

Richiesto:

il 18 Ott 2018

Commentato:

il 20 Ott 2023

Community Treasure Hunt

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

Start Hunting!

Translated by