Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Increment figure number in 3 dimensional loop
Replies: 5   Last Post: Jan 24, 2013 3:01 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Phil

Posts: 61
Registered: 12/8/08
Re: Increment figure number in 3 dimensional loop
Posted: Jan 24, 2013 3:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <kdpafh$epa$1@speranza.aioe.org>...
> On 1/23/2013 11:59 AM, dpb wrote:
> ...
>

> > A trivial way is to add a counter for the figure...
> > fig=0; % Initialize
> > for k = 1:2
> > for j = 1:8;
> > f=f+1;
> > figure(f)
> > ...
> > end
> > end

>
> Of course, keep the variable name consistent... :)
>
> 'f' --> 'fig'
>
> --


Thanks for this. It works nicely.

How would I iimplement a subplot? Where abouts in the code would I place say subplot(4,2,k) with k being one of the 16 figures?

Many thanks,

Phil



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.