Question: clc % clears console clear all % clears the history v = 2 0 0 ; % initialize velocity as 0 theta _ 1 =
clcclears console
clear allclears the history
v;initialize velocity as
theta;initialize theta as
g;initialize gravity as
kvsindthetag;time to get back on earth if there was no slope
for i::kcalculate x and h in tep
ifvsindthetaigii
vcosdthetai
defi;if it touchees or goes after the line
then break
break;
end
end
zvcosdthetadef;
zvsindthetadefgdefdef;
plotvcosdthetadef
vsindthetadef
gdefdefor;plot that point
textzz numstrz;; numstrz;
hold on
T::def;
XvcosdthetaT;
HvsindthetaTgTT;
plotXHc;plot the slope
hold on
xlabelrange meters;
ylabeldistance meters;
legendX numstrz; Y
numstrz;;
A::;
BA;
plotAB;
hold off;
dispTheta for max range is: ;
alphaatand;
thetaalpha
dispMaximum range is: ;
Rvvgcosdalphacosdalpha
sindalpha
At thetadeg there would be maximum range.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
