Holding selected iterations for a plot (but not all)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I am creating a plot within a loop and holding all calculations at present with 'hold on' . I would like to only hold selected iterations of my loop in order to make my plot clearer. i.e. if I am running my calculations for 1:100years I might select to plot 10, 25, 50, 75, 100 years.
Many thanks, Alex
0 Commenti
Risposta accettata
Sean de Wolski
il 15 Gen 2013
Modificato: Sean de Wolski
il 15 Gen 2013
for ii = 1:100
if ismember(ii,[10 25 50 75 100]);
hold on;
plot stuff;
else
hold off;
end
end
2 Commenti
Sean de Wolski
il 15 Gen 2013
You could just use plottools:
>>plottools on
To do it programatically you would need to store the line handles and then tool around with them.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!