Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions