How to create multiple graphs based on a variable that goes into a for-loop?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
GettinStarted
le 27 Juin 2020
Commenté : GettinStarted
le 29 Juin 2020
Hello Community,
I want to plot multiple graphs into one figure.
The multiple graphs are based on different geometry inputs, i.e. 4 graphs needed for 4 different
The different geometry inputs are used in a loop for B:
I can find the result for every single geometry input, which is fine:
How can I create several graphs for several geometry inputs at the same time?
Thank you very much
2 commentaires
Réponse acceptée
darova
le 28 Juin 2020
Maybe you need only one more for loop
expansion = [1 2 3 4];
x = 0:10;
% data
for k = 1:length(expansion)
y = sin(x)*expansion(k);
line(x,y)
end
3 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!