Question: Develop a flowchart and MATLAB script file which will determine the trajectory of a projectile as a function of time and write the results to
Develop a flowchart and MATLAB script file which will determine the trajectory of a projectile as a function of time and write the results to a text file named TrajResults.txt. The output of the program should be a table of (you may condense large groups of outputs/computations into single blocks to save space/time):
o Time
o Horizontal location
o Vertical location o Horizontal velocity
o Vertical velocity
o Resultant velocity.
The program should also determine maximum simulated elevation. Assume frictionless flight (no aerodynamic drag). User specifies:
o Units
o Relevant gravitational value
o Initial velocity
o Launch angle (in degrees)
o Time increment (in seconds)


Develop a flowchart and MATLAB script file which will determine the trajectory of a projectile as a function of time and write the results to a text file named "TrajResults.txt" The output of the program should be a table of (you may condense large groups of outputs/computations into single blocks to save space/time) o Time o Horizontal location o Vertical location o Horizontal velocity o Vertical velocity o Resultant velocity The program should also determine maximum simulated elevation. Assume frictionless flight (no aerodynamic drag) User specifies: o Units o Relevant gravitational value o Initial velocit o Launch angle (in degrees) o Time increment (in seconds) The relevant kinematic equations are 2 Where a is acceleration, d is displacement, t is time, vr is final velocity, and vo is initial velocity. The horizontal distance can be found as, where vox is the initial velocity in the horizontal direction and t is time. Additionally, the vertical x(t) oxt (1) distance can be found as, y(t)= Voyt_gt22 0 (2) 2 where voy is the initial velocity in the vertical direction and g is the acceleration of gravity. The program should include all values so long as y(t) 2 0. When the program is completed, the prompt and output should have the following format: Please input the units being used (m or ft) m Please input the corresponding value for gravity: 9.81 Please input the initial velocity: 25 Please input launch angle in degrees: 45 Please input the time increment in seconds: .25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
