[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting 3D
From: |
Henry F. Mollet |
Subject: |
Re: Plotting 3D |
Date: |
Mon, 27 Feb 2006 08:22:31 -0800 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
Robert gives one example from the section on Three-Dimensional Plotting in
the Manual i.e. Gnuplot style, i.e. Lower lower level function style. In
this example the z-value (i.e. x=randn(25,50) is plotted using the row index
as the x-value, and column index as the y-value. The indices are counted
from zero.
The MATLAB-style three dimensional plotting commands are
Function File: mesh (x,y,z). See the sombrero.m example. First try
sombrero(25) at the octave command prompt to see the result, then open the
'sombrero.m' m-file in an editor to see what code is needed to plot the
function
z = sin (sqrt (x^2 + y^2)) / sqrt (x^2 + y^2).
The most important step is the creation of a meshgrid for x and y using
[xx,yy] = meshgrid (x,y)
after you defined your x and y. In the sombrero.m example it is
y = y = linspace (-8,8,n), where n will be 25 if you use sombrero(25).
Henry
on 2/26/06 11:14 PM, Robert A. Macy at address@hidden wrote:
> try
>
>>> x=randn(25,50);
>>> gsplot x;
>
> Then use the mouse to rotate it around.
>
> - Robert -
>
> On Mon, 27 Feb 2006 11:15:57 +0800
> "tottie manuel" <address@hidden> wrote:
>> Hi!
>>
>> I'd like to know how to plot in 3d (ie, x,y and z axes).
>>
>> I'm using Octave 2.1.42 in Windows XP.
>>
>>
>> Thanks! Ö
>>
>>
>> -tottie-
>
>
>
> -------------------------------------------------------------
> 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
-------------------------------------------------------------