Numbering Plots

34 visualizaciones (últimos 30 días)
Aadil
Aadil el 3 de Abr. de 2012
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 comentarios
Walter Roberson
Walter Roberson el 3 de Abr. de 2012
You could start with
i = 1
so that it doesn't start from the last number.
Aadil
Aadil el 3 de Abr. de 2012
yeah just realised that a second ago LOL
Thanks

Iniciar sesión para comentar.

Respuesta aceptada

Aadil
Aadil el 23 de Abr. de 2012
answered by walter
  1 comentario
Daniel Shub
Daniel Shub el 23 de Abr. de 2012
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by