Airplane collision. (Matlab)

2 views (last 30 days)
성민 이
성민 이 on 3 Dec 2022
Answered: Image Analyst on 3 Dec 2022
An F-16 jet fighter is leaving from Rygge airfield, which we use as the origin of our coordinate system, at t = 0.0 s, and travels with a constant velocity v1 = 1700.0 km/hj towards the North. At the same time, an Airbus A310 airplane is passing over Oslo, which is located at r1 = −10 km i + 80 km j. The Airbus travels with a constant velocity of v2 = 105 km/h i + 905 km/h j. They are both travelling at the same height.
Sketch the trajectories of both planes in the same diagram. (You can do this on your computer if you like.)
I need total matlab code. please

Accepted Answer

Image Analyst
Image Analyst on 3 Dec 2022
This looks like a homework problem. If you have any questions ask your instructor or read the link below to get started:
Obviously we can't give you the full solution, despite the fact that you want "total code", because you're not allowed to turn in our code as your own.
In the meantime check out plot and break your airbus velocity into xVelocity and yVelocity and then use distance = velocity * time to get the x and y distance for the Airbus, which you can then plot. Start with trial and error to see how many seconds you might want to plot.
% Make time vector of 1000 elements going from 0 seconds to 2000 seconds.
t = linspace(0, 2000, 1000);
% Define F16 speed
v1 =
xF16 = zeros(1, length(t));
yF16 = t * v1
v2x =
v2y =
y2 =
x2 =
plot(xF16, yF16, 'r-', 'LineWidth', 3)
hold on;
plot(xy, )
etc.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!