Numbering Plots

20 次查看(过去 30 天)
Aadil
Aadil 2012-4-3
Hi,
I have a script that generates a list of plots and outputs it as a pdf.
Now sometimes I have to reorder the plots which means having to re-numbering the figure numbers.
*_Example:
figure(1)
Plot(.......
%%%%%%%%%%%%%%%%%%%%%%
figure(2)
Plot(.......
%%%%%%%%%%%%%%%%%%%%%%
figure(3)
Plot(....... _*
Is there any way round this? using a loop such as
i = i + 1
and then use figure(i) instead?
I can't seem to get it to work
Thanks
  4 个评论
Walter Roberson
Walter Roberson 2012-4-3
You could start with
i = 1
so that it doesn't start from the last number.
Aadil
Aadil 2012-4-3
yeah just realised that a second ago LOL
Thanks

请先登录,再进行评论。

采纳的回答

Aadil
Aadil 2012-4-23
answered by walter
  1 个评论
Daniel Shub
Daniel Shub 2012-4-23
You may want to loop over ii instead of i. The variables i and j are special and start with the value of sqrt(-1) and ideally should not be overwritten since other scripts might depend on them having there initial values.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by