help-octave
[Top][All Lists]
Advanced

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

Re: Plotting a simple function in 3D?


From: Jordi Gutiérrez Hermoso
Subject: Re: Plotting a simple function in 3D?
Date: Sat, 4 Dec 2010 11:17:48 -0600

On 4 December 2010 11:13, Martin Helm <address@hidden> wrote:
> Am Samstag, 4. Dezember 2010, 17:29:12 schrieb loinen:

>> I'm trying to plot a simple function alpha=sqrt(3)*h/l
>> where h and l are vectors containing integers 0..100

> Do you mean something like that?
>
> octave:1> h = 0:100;
> octave:2> l = 0:100;
> octave:3> [hh, ll] = meshgrid(h, l);
> octave:4> alpha = sqrt(3) .* hh ./ ll;
> octave:5> surf(hh, ll, alpha)

Note that a 100x100 mesh is rather large for the gnuplot backend, so
you'll see that the plotting takes a noticeably long time. The fltk
backend fares better with meshes of this size, although it's still
very incomplete in the latest 3.2.4 stable release, and still not
stable enough in the development sources.

If you're patient, use the gnuplot backend. If you're not, try the
fltk backend or reduce the mesh size (e.g. h = 0:3:100).

- Jordi G. H.


reply via email to

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