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

Hello, how would I type this up in MATLAB. Also, can you screenshot how it looks

ID: 3108939 • Letter: H

Question

Hello, how would I type this up in MATLAB. Also, can you screenshot how it looks in Matlab with the answer if possible to make things easier. Thank you.

Problem 2 Aircraft Ais flying east at 320 mi/hr, while aircraft Bis flying south at 160 mi/hr. At 1:00 pm the aircrafts are located as shown. a. Obtain the expression for the distance D between the aircrafts as a function of time. Plot D versus time until D reaches its minimum value. b. Use the roots function to compute the time when the aircrafts are first within 30 miles of each other. 160 milh 410 mi 320 milh 800 mi L55-2

Explanation / Answer

Matlab Code (Self explanatory):

---------------------------------------------------------------------

syms t
x = -800 + 320*t % x-coordinate
y = 410 - 160*t % y-coordinate

D = @(t) sqrt((-800 + 320*t)^2 + (410 - 160*t)^2)

%Time t at minimum Distance
min_t = fminbnd(D,0,5);

%Plot D for part a
fplot(D, [0 min_t])
xlabel('Time (hrs)')
ylabel('Distance (miles)')

%part b
% D = 30 => (-800 + 320*t)^2 + (410 - 160*t)^2 - 900 =
% 128000t^2-643200t+807200 = 0

p = [128000 -643200 807200];
r = roots(p);

First_time_30_miles = min(r)

----------------------------------------------------------------------

DO THUMBS UP ^_^

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote