Assignment #8 �Using if statement to modify User Defined function: launch_angle_smart� � Posted 10/15, due 10/23 11:59 pm �Late: 10/24 12:01 am – 10/25 11:59 pm�Game over: after 10/25 11:59 pm: 0 point
Missile Guidance / Launch Angle Analysis
P2(7,8)
P1(5,6)
P1
P2
A
B
A(5,0)
B(7,0)
θ (theta)
x
y
* The Drone moves from P1 to P2 in t seconds
Given: t_elapse is the elapse time (in second) that the drone passes from P1 to P2
Calculate: the launch angle theta (in degree)
Using User defined function: launch_angle
Review from class website:
* User defined function: launch_angle.m
* Using if statement to modify launch_angle.m, save it as launch_angle_smart.m
* Apply if statement to launch_angle_smart.m so that when the drone is flying > Mach 2, MATLAB will say:
” Drone is moving too fast, go straight to Miller Time!”
use function launch_angle_smart.m to find launch angle for elapse_time: t=[1,5,10,15]
(4 points) Screenshot of script to show 2 if statements
(4 points) Screenshot of Command windows results to show 4 test cases t=[1,5,10,15]