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

Write down the script Two ships, A and B, depart from two different ports. Ship

ID: 3558063 • Letter: W

Question

Write down the script

Two ships, A and B, depart from two different ports. Ship "A" travels towards the NE (i.e., towards the East in an angle, theta , of 30 degree North) at a speed of 14 miles per hour, while Ship "B" travels South at a speed of 7 miles per hour. At 7 AM, the ships are positioned as shown in the schematic. Complete the script "problem0301.m" such as it prepares a table showing the position [x, y] of each ship as a function of time [t, for 0 le t le 5 hours] (use the schematic and equations provided by the instructor) Expand the output table to display the distance between the two ships as a function of time. If the visibility is 8 miles, when [time, HH:MM], and for how long, would people from the two ships be able to see each other? Plot the distance between the two ships as a function of time [For full credit] this plot should include: Your Name, CSU ID, and Problem Title. Axes labels, including units A grid submit the plot along with the script and output tables

Explanation / Answer

initialShipAposition = [-21.65,-12.5];
initialShipBposition = [0,12];
velocityA = [12.12,7];
velocityB = [0,-7];
shipAposition = zeros(301,2);
shipBposition = zeros(301,2);
distance = zeros(301,2);
t = 0:1/60:5;
for i = 1:301
shipAposition(i,:) = initialShipAposition + [t(i),t(i)].* velocityA;
shipBposition(i,:) = initialShipBposition + [t(i),t(i)].* velocityB; %[x,y in miles]
distance(i) = sqrt((shipAposition(i,1)-shipBposition(i,1))^2 + (shipAposition(i,2) - shipBposition(i,2))^2);
end

plot(t,distance);

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