Question

A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x

·STAEDTLER Mars plastic 50 ea ns cuet ecttun 800 V.

331 PM lo Seco Thomot intercect 36, So 56297 31.1 lyc=フ25a.can

EDITOR PUBLISH VEW nsert Run Section Το ▼ Comment % ndent EDIT Breakpoints RunRun and Advance Run and Advance Time ATE BREAKP

Please help me correct my MATLAB script code for this problem, thank you!!

A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x. The impact point of the projectile Pa is a point B in a valley with an ordinate, yon, located below the clevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile P launched simultaneously towards the west to intercept the incoming projectile PA. Projectile Pn has a launch velocit vo What should be the launch angle 0 в of projectile PB in order to intercept projectile PA. Assume zero air resistance during flight. Assume point A is located at the origin of the right hand Cartesian coordinate system with k pointing in the east direction and y is the altitude 0on 40 deg. Von 8o0 m/s you- Answer the following questions based on the results of your MATLAB program I. Launch angle 00B ǐn degrees of projectile PB 2. Distance in meters from point A to B 3. Time of flight in seconds from point A to point B of projectile P Maximum height in meters of projectile P Maximum height in meters of projectile PB- 5. 6. Time at intercept in seconds from launch if there is an intercept. 7. Coordinates of intercept (Xe, Ye) in meters between PA and P Derive all the relevant equations necessary to determine intercept between the two projectiles. Make a diagram to show the trajectories and indicate the variables that will be used in the development of the equations. DO NOT USE NUMBERS WHILE DERIVING THE EQUATIONS Using MATLAB write a script file to do the following: Calculate the trajectories of PA and Pu I. 2. 3. Answer to questions 1-7 listed above. Plot the two trajectories on one graph depicting the intercept by a marker (see figure below for example). Label the graph appropriately with units. Give legend and title to graph Note: Include sufficient comments in the script file so one can understand what the various statements in the code mean. Program should work when using different input variables, so try other variables Submit the following: This sheet signed and on top of all other printouts Printout of the MS Word file, script file and output graph Printout showing the answers to questions listed above in the command window Email the script file and MS word file as attachments. Email once only since only the first email will be accepted so be careful. . Trajectory of Projectie A and B
·STAEDTLER Mars plastic 50 ea ns cuet ecttun 800 V.
331 PM lo Seco Thomot intercect 36, So 56297 31.1 lyc=フ25a.can
EDITOR PUBLISH VEW nsert Run Section Το ▼ Comment % ndent EDIT Breakpoints RunRun and Advance Run and Advance Time ATE BREAKPOINTS RUN Documents MATLAB r - ClUsers\BenlDocumentsl MATLABlprojectile proj.m jectile_proj.m xI+ %% Th % Angles are in degrees, time is in seconds & distance is in meters VoA-600: ThetaA-40: h-0 VOB=800; ThetaB=28.81; x [-200:10:2001: ya=h-4 . 9* (x/ (VoA"cos (ThetaA" (pi/180) ) ) ) . ^2+tan (ThetaA"(pi/180) ) yb=h-4 . 9* (x/ (VoB* cos (ThetaB" (pi/ 180) ) ) ) . ^2+tan (ThetaB" (p1/180) ) plot (x, ya x, yb, o) is program graphs the trajectory of two projectiles xlabel "Distance in meters') ylabel Distance in meters') legend (Pa Pb) mand Window
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE----------------------------------------------------------------------------------------------------

%% this program ghaphs the trajectory of two projectiles

% Angles are in degrees, time is in seconds & distances are in metres

VoA=600;

ThetaA=40;

h=0;

VoB=800;

ThetaB=(180/pi)*asin(VoA*sind(ThetaA)/VoB)

Time_of_flight_A_to_B=2*VoA*sind(ThetaA)/9.81

Distance_from_A_to_B=VoA*cosd(ThetaA)*Time_of_flight_A_to_B

Time_of_intercept=(Distance_from_A_to_B)/(VoA*cosd(ThetaA)+VoB*cosd(ThetaB))

Xc=VoA*cosd(ThetaA)*Time_of_intercept

Yc=VoA*sind(ThetaA)*Time_of_intercept-(0.5*9.81*Time_of_intercept^2)

x=[-200:10:200];

for i=1:41

ya(i)=h-4.9*(x(i)/(VoA*cosd(ThetaA))).^2+tand(ThetaA);

yb(i)=h-4.9*(x(i)/(VoB*cosd(ThetaB))).^2+tand(ThetaB);

end

x=[-200:10:200];

plot(x,ya,'x')

hold on

plot(x,yb,'o')

xlabel('Distances in metres')

ylabel('Distances in metres')

legend('Pa','Pb')

hold off

OUTPUT--------------RESULT------------------------------------------------------------------------

ThetaB =  28.822
Time_of_flight_A_to_B =  78.628
Distance_from_A_to_B =    3.6140e+04
Time_of_intercept =  31.141
Xc =    1.4313e+04
Yc =  7253.5
Pa Pb 0.8 0.6 O.A 0.2 -0.2 -200 150 -100 -50 50 100 150 200 Distances in metres

 
Add a comment
Know the answer?
Add Answer to:
Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial...
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