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

How to do this problem? velocity nu is given by the following equation. D = nu 2

ID: 3533612 • Letter: H

Question



How to do this problem?

velocity nu is given by the following equation. D = nu 2sin(2 theta ) / 9.81 Create a MATLAB function that tells the user whether they are close to a target located at a distance dt (within 1 m). short of target, or long of the target. Create a MATLAB function that takes the coefficients dt, theta , and nu as input and returns the distance D as output Inside the function tile: Compute the value of the distance D (suppress command window output). Using conditional statements and relational operators have the program do the following: If D > dt + 1. display "You have overshot the target!" If |D - dt| 1. display "You are within 1 meter of the target!" (NOTE: vertical bars above mean absolute value) If D

Explanation / Answer

function distance(dt,theta,v)

D = (v^2)*sin(2*theta)/9.81;

if D > (dt+1)

disp('You have overshot the target');

elseif D <(dt-1)

disp('You have undershot the target');

else

disp('You are within 1m the target');

end

end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote