plotting a variable size of dataset
Ältere Kommentare anzeigen
Hello all,
The question is to ease my data plotting. Right now I have 6 sets of data array. Lets call them C1, C2, C3, V1, V2, V3. So I plot using the code
plot(V1, C1, 'b', V2, C2, 'b','linewidth',3); hold on;
plot(V3, C3, 'b', V4, C4, 'b','linewidth',3);
plot(V5, C5, 'b', V6, C6, 'b','linewidth',3);
The issue however is that I dont have the same number of data sets all the time. Instead of 6 sets, sometimes I have 4, sometimes I have 10. So each times I have to add extra plot lines of comment some lines out to get the figure.
My question is how can I plot them without adding/subtracting any lines. I am thinking using a for loop to call however many data arrays I have and have them plotted.
I would really appreciate some help.
Thanks all very much.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
