How to mkae dynamic figures

조회 수: 6 (최근 30일)
Alaa Hameed
Alaa Hameed 2016년 3월 19일
답변: Star Strider 2016년 3월 19일
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

답변 (1개)

Star Strider
Star Strider 2016년 3월 19일
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
plot(x, y(k1,:))
title(sprintf('Figure %.0f', k1))


Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by