フィルターのクリア

How to update a plot while a simulation is running?

7 ビュー (過去 30 日間)
Harsh Rangwala
Harsh Rangwala 2023 年 1 月 31 日
編集済み: VBBV 2023 年 2 月 23 日
I am running a simulation using this example:
I want to plot a marker on a new Matlab figure on geographical map while my simulation is running. The simulation will generate some readings and when those readings go above the threshold, I want to plot a marker in the figure after the simulation finishes running. .
This is the code that I wrote as my first attempt:
for i=1:numel(fusedTrackLog)
tracks = fusedTrackLog{i};
[truths.Position, ~, truths.Velocity] = lookupPose(flightRoute, i-1,'ECEF');
fusedospa(i) = ospa(tracks, truths);
if fusedospa(i) > 25
% create plot here
end
end
This is the plot I am getting however, there is just one marker at a given location. Is there any way to plot multiple markers on the map?

回答 (1 件)

VBBV
VBBV 2023 年 2 月 1 日
編集済み: VBBV 2023 年 2 月 23 日
if fusedospa(i) > 25
% create plot
hold on
end
Use hold on

Community Treasure Hunt

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

Start Hunting!

Translated by