mesh() and surf() errors & sorting [x, y, z] matrix into meshgrid matrix.
Michael Barton
bartonm09 at gmail.com
Mon Jul 7 13:10:50 CDT 2008
I have a large collection of data points in the form of (x,y,z) coordinates
stored in an [N,3] matrix. Octave can successfully run: plot3() with any
warnings or errors. However, I need to use contour() and surface plots like
surf() and mesh(). Unfortunately, Octave crashes with a memory error with
the command: contour().
As for surf() and mesh(), the following error messages are returned:
surf(DataSet(:,1),DataSet(:,2),DataSet(:,3)):
error: rows(z) must be the same as length(y) and columns (z) must be the
same as length(x)
...
mesh(DataSet(:,1),DataSet(:,2),DataSet(:,3)):
error: rows(z) must be the same as length(y) and columns (z) must be the
same as length(x)
...
>From the documentation, surf() and mesh() require the a grid of x and y data
to be established. Is there anyway to sort the DataSet matrix in such a way
that surf() and mesh() plot successfully?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080707/537e6031/attachment.html
More information about the Help-octave
mailing list