Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am having trouble with this particular Matlab question. As you can see stated,

ID: 3742455 • Letter: I

Question

I am having trouble with this particular Matlab question. As you can see stated, I am trying to do the question by paper and writing first. However, it does not seem like my answer(s) seem correct.

The range of an object shot at an angle e with respect to the x-axis and an initial velocity Vo (Figure P3.16) is given by Range = sin(20) for 0 s s /2 and neglecting air resistance. Use g-9.81 m/s' and an initial velocity vo of 75 m/s. _ Range Figure P3.16 The range depends on the launch angle and the launch velocity. Find both the maximum range and the angle of the maximum range by computing the range in increments of n/50 between 0 /2. Show that the maximum range is obtained at approximately = /4. You won't be able to find the exact angle that results in the maximum range, because your calculations are at evenly spaced angles of Tt/50 radian.

Explanation / Answer

v0 = 75;

g = 9.81;

% create theta vector from 0 to 2 *pi with an increment of pi/50

theta = [ 0 : pi / 50 : pi / 2 ];

% create vector to store range

Range = [ 1 : length(theta) ];

% store maximum range

max_range = 0;

% store angle at maximum range

max_angle = 0;

for i = 1 : length(theta)

   

    % calculate current range

    Range(i) = ( ( v0 ^ 2 ) / g ) * sin( 2 * theta(i) );

   

    if Range(i) > max_range

       

        max_range = Range(i);

        max_angle = theta(i);

       

    end

   

end

fprintf('Maximum Range : %f ', max_range);

fprintf('Maximum Range Angle : %f ', max_angle);

Sample Output

Maximum Range : 572.263032
Maximum Range Angle : 0.753982