Two such trajectories corresponding to launch angles of 45


The trajectory of an object can be modeled as
y = (tan θ0)x - g x2 + y0,
2v02 cos2 θ0
where y is the achieved height in meters (m), θ0 is the initial angle (degrees), x is the horizontal distance (m), g is the gravitational acceleration (= 9.81 m/s2), v0 is the initial velocity (m/s), and y0 is the initial height. Write a well commented MATLAB script to find the trajectories for y0 = 0 and v0 = 28 m/s for initial angles ranging from 15 to 75 degrees in increments of 15 degrees. Employ a range of horizontal distances from x = 0 to 80 m in increments of 1 m. Your script must perform the following tasks:
• Assemble the y results in an array called my table where the first dimension (rows) corresponds to the hor- izontal distances and the second dimension (columns) corresponds to the different initial angles. For instance, the values in first column of the table, that is my table(:,1), should represent the heights achieved by the object for various values of the horizontal distance x, given an initial launch angle of 15?, and so on. (Note that θ is in degrees and so use the appropriate MATLAB function to obtain the corresponding trigonometric values.)
• Now use the above table to generate a single plot of the heights versus horizontal distances for each of the initial angles. Label the axes appropriately and use a legend to distinguish among the different cases. Scale the plot such that the minimum height is zero using the axis command. The following plot shows two such trajectories corresponding to launch angles of 45? and 60?, respectively.

Solution Preview :

Prepared by a verified Expert
Electrical Engineering: Two such trajectories corresponding to launch angles of 45
Reference No:- TGS0762881

Now Priced at $30 (50% Discount)

Recommended (99%)

Rated (4.3/5)