How to plot 50 figures each has 3 curves for loop
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hussein Al Jebaei
il 15 Dic 2021
Commentato: Hussein Al Jebaei
il 15 Dic 2021
I have a for loop that does calculation of three arrays and then I plot them in one figure. I plan to do the same for 50 figures.
for i=1:numel(x)
pcf(i)=pmd(i)/s(i);
pc(i)=pld(i)/s(i);
ph(i)=pud(i)/s(i);
end
pcf;
pc;
ph;
plot(x,pc,'g')
hold on
plot(x,pcf,'b')
plot(x,ph,'r')
Risposta accettata
Jan
il 15 Dic 2021
You show us the code to create one set of lines. Then simply add this command before plotting:
figure()
axes('NextPlot', 'add'); % as: hold on (which can be omitted then)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Graphics Performance 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!