Question

A projectile is shot at an angle of 50 degrees with respect to the horizontal at...

A projectile is shot at an angle of 50 degrees with respect to the horizontal at a velocity of 200 m/s. Earth's gravity is 9.81 m/s^2. Take the variable x as the range and y as the altitude. Create a MATLAB plot, which plots that trajectory. Now, assume the terrain slopes up by 1 m in y for every 10 m in x. On the same axis, plot the line of the terrain in a different color. (without using a for loop)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solving above problem by using online MAT Compiler

codinggrouind Execute MATLABIOctave Online (GNU Octave, v4.2.1) rag the cursor around the area you ant to ca Execute l > Shar

Output what I got there:

0.8 0.8 0.4 ILA 0.8 0.8 0.4 0.2 Distance (in m)

0.8 0.8 0.4 ILA 0.2 0.8 0.4 0.8 0.2 Distance (in m)

0.8 0.8 0.4 0.2- 0.8 0.8 0.2 0.4 Distance (in m)

0.5- -0.5 -0.5 Distance (in m)

20 15 10 101 12 14 Distance (in m)

30 25 20 15 10 20 25 30 15 10 Distance (in m)

50 40 30 20 10_ 10 15 20 25 30 35 40 Distance (in m)

80 50 40 30 20 10 10 20 30 40 50 60 Distance (in m)

80 70 60 50 40 20 10 10 20 30 40 50 60 70 Distance (in m)

80 60 20 10 20 30 40 70 80 Distance (in m)

80 60- 40 20 20 40 80 100 Distance (in m)

120 - 100 80 80 40_ 20 20 40 60 80 100 Distance (in m)

140 - 120 00_ 80 60 40 20 20 40 60 80 100 Distance (in m)

140 120 100 E 80 40 20 20 40 80 80 120 140 Distance (in m)

200 - 150 100 - 50_ 50 100 200 Distance (in m)

200 - 150 100_ 50_ 50 제11 Distance (in m)

200 - 150 100_ 50_ 50 제11 Distance (in m)

200 - 150 100 . 50_ 50 제11 Distance (in m)

200 150 100_ 50 50 제1: Distance (in m)

250 200 150_ 100 50_ 50 100 150 200 250 Distance (in m)

250 200 150 100 50- 50 150 250 Distance (in m)

250 200 150_ 50_ 50 100 150 200 Distance (in m)

250 200 150_ 50_ 1INI 150 200 50 Distance (in m)

250 200 150_ 50_ 50 100 150 200 Distance (in m)

300 - 250 200 150 - 100- 50 50 100 150 冰! 250 300 Distance (in m)

300- 250 200 150 - 100- 50 50 100 150 제11 250 350 Distance (in m)

300- 250 200 150 100- 50 50 150 200 250 350 Distance (in m)

media%2F32c%2F32c82f8d-ba12-46e9-ac82-61

media%2F1a5%2F1a5540e7-b6fb-4e19-87c3-94

Code Used:

clear all
close all
clc

init_velocity=200;
init_angle=50;

angle=(init_angle);
u=init_velocity;
g=32.2; % accelaeration due to gravity

T_hit=(2*u*sind(angle))/g; % calculate time to hit
tstep=ceil(T_hit)/100; % calculate t step

tval=[0:tstep:T_hit]; % time steps

figure
xlabel('Distance (in m)');
ylabel('Height (in m)');
hold on


for k=1:length(tval)
distance(k,:)=u*cosd(angle)*tval(k); % caluclate horizontal components
height(k,:)=(u*sind(angle)*tval(k))-0.5*g*tval(k)^2; % calculate vectical component
plot(distance,height,'bo','MarkerSize',7); % plot the psotiotion of ball and the har
pause(0.005)
end
hold off

Add a comment
Know the answer?
Add Answer to:
A projectile is shot at an angle of 50 degrees with respect to the horizontal at...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT