help-octave
[Top][All Lists]

Re: Octave's contour function

 From: Jonathan M Hill Subject: Re: Octave's contour function Date: Thu, 7 Dec 2000 17:36:32 -0500 (EST)

```Hello;

I was just playing with the contour function the other day and
managed to make a simple example.  I used the online help to
construct the  example.  I'm sorry that I don't have much experience
with this.

octave:2> help contour
usage: contour (z, n, x, y)

bar, stairs, gplot, gsplot, replot, xlabel, ylabel, title

Here is what I discovered; z is a rectangular matrix, the
simplest use assumes (0,0) to be the lowest corner and uses the matrix
size to get the other.  n is the number of isolines to draw, I think the
default is 11 lines.

octave> z = [
1 1 1;
1 1 2];
octave> contour(z)

The x and y terms are optional vectors, either column or row type.
I think these are used to define other values for the x and y axes.

octave> contour(z, 4, [0 1], [0 0.5 1])

Perhaps a few others have some comments to make?

Jonathan Hill

On Thu, 7 Dec 2000, Fernando Fraga e Silva wrote:

>
> I couldn't figure how to use the function "contour" by reading the info
> manual about this one. I missed a simple example as a pattern to learn to use
> it. Does anyone here could send me a little example about it ?
>
> I need to plot the contour of a function f(x,y).
>
> I'm really thanks .
>
> ---
> Fernando Fraga e Silva
> Undergraduated Mechanical Engineering Student from University of São Paulo
>
>
>
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
>
>

-------------------------------------------------------------
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
-------------------------------------------------------------

```