Projectile Trajectory Problem
Solution
1.3
2.3
3.2
4.6
5.4
6.6
7.6
8.3
9.4
10.1
11.PFAmatlab file and jpg pic
12.4
13.1
14.2
15.4
16.3
17.2
18.1
19.1
20.1
21.3
22.PFAmatlab file
soln_11.m
t=linspace(0,0.1788,100); % at t=0.1788, y becomes zero
x=3*cosd(17)*t;
y=3*sind(17)*t-0.5*9.81*t.*t;
plot(x,y);
grid on;
xlabel(‘x’);
ylabel(‘y’);
title(‘Trajectory of projectile’);
soln_22.m
% assume initial velocity as 1 m/s, maximum angle doesn’t depend on initial
% velocity
g=9.81;
syms theta;
t=2*sin(theta)/g;
%range is sin(2*theta)/g assuming initial velocity 1 m/s
R=sin(2*theta)/g;
df=diff(R,theta);
for t=linspace(0,pi/2,99)
if abs(eval(subs(df,t)))==0
angle_req=t;
break;
end
end
disp(angle_req*(180/pi)); %convert into degrees