matlab plot in real time
3 views (last 30 days)
just a really simple problem, how can I plot this diagram in real time. I want those red crosses plotted on to my graph one by one rather than all of them at the same time.
Geoff Hayes on 11 Dec 2015
jianlong - try using the hold on command to retain the current plot when adding new ones. For example
hFig = figure;
Note how I have removed the B and the temporary variables and just access the element of A on the kth iteration as A(k).
More Answers (2)
Joseph Cheng on 11 Dec 2015
no idea what you're doing with A or B especially with defining B but then using it as the indexer in the for loop but get what you can from the example:
figure(1),hold on,axis([0 10 0 10])