x = input ('Enter the vertical component: ');g = input ('Enter the gravity value: ');v = input ('Enter the initial velocity: ');t = input ('Enter the angle of inclination of the initial velocity from horizontal axis: ');y=x*tan(t)-((g*x^2)/(2*(v^2) *(cos(t)^2)));plot(x,y,'b')axis ([0 1000 0 10])xlabel ('Distance Downrange in Feet')ylabel ('Height From Ground in Feet')title ('Projected Trajectory of a Projectile')
MATLAB: I’m very new to matlab and I’m making a very simple ballistic calculator and can’t get the graph to work. Any suggestions
plotprojectile
Best Answer