Create a better plot

3 views (last 30 days)
Miguel Albuquerque
Miguel Albuquerque on 5 Jul 2022
Heu guys, I have this plot:
This plot defines a plane with a radar moving in x axis, from position 0 to position 400. And at position 184 to position 276, detects a target and calculates the distance to the target. Is there a better plot or gif, that simulates plane moving from 0 to 400 and achieving that range to targets?
Thanks
  2 Comments
Miguel Albuquerque
Miguel Albuquerque on 5 Jul 2022
Yes you're probably right, by the way the target is not moving, is just the aeroplane that moves, so, the distance increases :D

Sign in to comment.

Accepted Answer

Mathieu NOE
Mathieu NOE on 5 Jul 2022
hello
maybe you want to make an animated line
demo :
%% create animatedline object / handle
figure
h1 = animatedline;
h1.Marker = '*';
h1.Color = [1 0.4 0];
h2 = animatedline;
h2.Marker = '+';
h2.Color = [0 1 0];
axis([0 5 -1.2 1.2]);
%% dummy data
x = linspace(0,2*pi,100);
y1 = sin(x);
y2 = cos(x);
for ci=1:length(x)
addpoints(h1,x(ci),y1(ci));
addpoints(h2,x(ci),y2(ci));
pause(0.1);
drawnow
end

More Answers (0)

Categories

Find more on Polar Plots in Help Center and File Exchange

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!