help-octave
[Top][All Lists]
Advanced

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

Re: contourc function available


From: Victor Munoz
Subject: Re: contourc function available
Date: Sat, 15 May 2004 08:40:13 +0900
User-agent: Mutt/1.3.28i

On Fri, May 14, 2004 at 09:33:05AM -0700, Henry F. Mollet wrote:
> Are contour (what I use in octave calling gnuplot), contourc, and contourl
> just different names for functions.m that have the same purpose, namely
> doing a contour plot?
> Henry
> 

 All of them do contour plots. The difference is in the details. In Matlab
you can call contour(), and it will plot the contour, but if you call
contourc() you will get a 'contour matrix'. If levels are [l1 l2...] and
each one consists of [n1 n2...] points, then this matrix is
 [l1 x_1 x_2 .... x_n1 l2 x_1 .... x_n2 .... ;
  n1 y_1 y_2 .... y_n1 n2 y_1 .... y_n2 .... ];
  
 For several reasons I've needed to manipulate the contour lines after
generating them (to superimpose two contour plots after generating them, to
pass the data to an external program, etc.), so I find this very useful.
There is no contourc() function in Octave, and I could not find an (easy)
way to obtain the contour data with gnuplot, so contourl is a possible
solution. 

 However, contourl is C++ code. It only receives de data (the grid, function
values on the grid, and levels to plot) and returns a matrix in the style of
Matlab's contourc(). For actual work within Octave, I wrote another script,
contour_vm.m, which in turn calls an executable via system(). Pedestrian, as
I said in a previous mail. (I didn't put it in the web page where contourl
is available for this reason, but maybe I should to close the circle.)

 Regards,
 
                                        Victor
                                        



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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