Question: clc % clears console clear all % clears the history v = 2 0 0 ; % initialize velocity as 0 theta _ 1 =

clc%clears console
clear all%clears the history
v=200;%initialize velocity as 0
theta_1=50;%initialize theta1 as 50
g=9.81;%initialize gravity as 9.81
k=(2*v*sind(theta_1))/g;%time to get back on earth if there was no slope
for i=0:0.01:k%calculate x and h in 0.01 tep
if(((v*sind(theta_1)*i)-(0.5*g*i.*i)-0.1*
(vcosd(theta_1)*i))<0)
def=i;%if it touchees or goes after the line
then break
break;
end
end
z1=(v*cosd(theta_1)*def);
z2=(v*sind(theta_1)*def-(0.5*g*def.*def);
plot((v*cosd(theta_1)*def),
(v*sind(theta_1)*def)-
(0.5*g*def.*def),'or');%plot that point
text(z1,z2[(' num2str(z1);; num2str(z2)')']);
hold on
T=0:0.1:def;
X1=(v*cosd(theta_1)*T);
H1=(v*sind(theta_1)*T-(0.5*g*T.*T);
plot(X1,H1,'c');%plot the slope
hold on
xlabel('range (meters)');
ylabel('distance (meters)');
legend(['(X=' num2str(z1);, Y='
num2str(z2);)']);
A=0:0.01:4000;
B=(1/10)*A;
plot(A,B);
hold off;
disp('Theta for max range is: ');
alpha=atand(0.1)/2;
theta=45+alpha
disp('Maximum range is: ');
R=((v*v)/(g*cosd(alpha)*cosd(alpha)))*(1-
sind(alpha))
%At theta=47.8553\deg , there would be maximum range.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!