Effacer les filtres
Effacer les filtres

How to mkae dynamic figures

3 vues (au cours des 30 derniers jours)
Alaa Hameed
Alaa Hameed le 19 Mar 2016
I want to create a series of graphes through a loop process and want to change the number of the figure correspondingly, besides the corresponding out put for that figure

Réponses (1)

Star Strider
Star Strider le 19 Mar 2016
Something like this could do what you want:
x = 0:0.1:10;
y = [sin(2*pi*x/5); cos(2*pi*x/3); sin(2*pi*x).*sin(pi*x)];
for k1 = 1:3
subplot(3,1,k1)
plot(x, y(k1,:))
grid
title(sprintf('Figure %.0f', k1))
end

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!

Translated by