help-octave
[Top][All Lists]
Advanced

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

Re: mesh plot


From: asha g
Subject: Re: mesh plot
Date: Fri, 3 May 2013 16:35:44 +0800 (SGT)


Your script doesn't refer to either 'N' or 'iter', so the following is a
*guess* that 'N' is numel(x) and 'iter' is numel(z).  Furthermore I
*assume* that the quantities 'x', 'y', and 'z' are computed by some
external means, have conformable dimensions and Just Exist[tm] in your
environment.

To pick up every five elements of 'y' in each coordinate direction, you
could do something like this:

        i = 1 : 5 : numel(x);
        j = 1 : 5 : numel(z);
        mesh(z(j), x(i), y(i,j))

Adjust the stride (in this case, '5') appropriately if you want more or
fewer points in your mesh plot.

Note: mesh(z(j), x(i), y(i,j)) is not a misprint.  If you use vectors as
coordinates, then number of rows of the third parameter must match the
number of elements of the *second* parameter and the number of columns
of the third parameter must match the number of elements of the first
parameter.

Am running it right now. Will keep you posted on whether I get the required result.
Asha 

reply via email to

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