[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple plots
From: |
asha g |
Subject: |
Re: Multiple plots |
Date: |
Wed, 18 Jul 2007 04:26:04 -0700 (PDT) |
The x axis is x = linspace(0,l,N)
X = x/lambda
So as N varies, X varies. How do you put that on one
plot?
Asha
--- Søren Hauberg <address@hidden> wrote:
> I don't quite understand your problem. You can use
> the 'hold' command to
> plot several plots on one figure. The code for this
> looks something like
> this:
>
> figure
> hold on
> for N = 10: 10: 40
> plot(f(N), Y)
> endfor
> hold off
>
> or you can put all your data in a matrix and then
> plot that matrix. This
> would look something like this
>
> N = 10: 10: 40;
> data = zeros(length(X), length(N));
> for i = 1:length(N)
> data(:, i) = f(N(i));
> endfor
> plot(data)
>
> I haven't tested any of the above code, but
> something similar to the two
> examples should work for you.
>
> Søren
>
>
> asha g skrev:
> > Could someone tell me what the command is for
> multiple
> > plots. Basically I have N = 10: 10: 40
> >
> > I am plotting a fn X vs Y for the various values
> of N
> > and would like them to be in the same plot
> ideally
> > but I get an error message for that as X = f(N).
> > So I would like to plot it in subplots.
> >
> > I tried mplot(X,Y) but I get an error message :
> > 'mplot' undefined.
> >
> > thanks
> > Asha
> >
> >
> >
> >
> >
> > Goals too clearly defined can become blinkers.
> > Mary Catherine Bateson
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Building a website is a piece of cake. Yahoo!
> Small Business gives you all the tools to get
> online.
> > http://smallbusiness.yahoo.com/webhosting
> > _______________________________________________
> > Help-octave mailing list
> > address@hidden
> >
>
https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
Goals too clearly defined can become blinkers.
Mary Catherine Bateson
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC