help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple plots


From: Søren Hauberg
Subject: Re: Multiple plots
Date: Wed, 18 Jul 2007 13:20:07 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]