help-octave
[Top][All Lists]
Advanced

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

Re: mesh plot error


From: Brian Tyrrell
Subject: Re: mesh plot error
Date: Mon, 21 Dec 1998 14:52:08 -0500

Although some of the documentation may be correct, it seems that in the
error message that is generated, the use of "row" and "column" is switched.
 Shouldn't the error message read:

"columns (z) must be the same as length (x) and rows (z) must be the same
as length (y)"



At 12:26 PM 12/21/98 +0000, you wrote:
>The following code works:
>
>x=linspace(0,10,200);
>y=linspace(0,10,100);
>z=zeros(100,200);
>
>According to the Matlab documentation you should meet the following
>conditions:
>length(x)=n
>length(y)=m
>[m,n]=size(Z)
>
>There's a similar statement in the help for mesh in octave:
>"If x and y are vectors, then a typical vertex is (x(j), y(i),
>z(i,j))."
>
>The documentations seems to be correct in both cases.
>
>Regards,
>Erich Schneider
>
>
>On Fri, 18 Dec 1998 14:54:13 -0500, Brian Tyrrell wrote:
>
>>The following is a replication of an error I encountered when writing a
>>script:
>>
>>octave:1> x=linspace(0,10,100);
>>octave:2> y=linspace(0,10,200);
>>octave:3> z=zeros(100,200);
>>octave:4> rows(z) 
>>ans = 100
>>octave:5> columns(z) 
>>ans = 200
>>octave:6> length(x)
>>ans = 100
>>octave:7> length(y)
>>ans = 200
>>octave:8> mesh(x,y,z);
>>error: mesh: rows (z) must be the same as length (x) and
>>columns (z) must be the same as length (y)
>>error: evaluating index expression near line 80, column 9
>>error: evaluating if command near line 56, column 7
>>error: evaluating if command near line 53, column 5
>>error: evaluating if command near line 39, column 3
>>error: called from `mesh' in file
>>`/home2/tyrrell/octave/share/octave/2.0.13.95/m/plot/mesh.m'
>>octave:8> 
>>
>>
>>According to the error message, "rows (z) must be the same as length (x) and
>>columns (z) must be the same as length (y)," but this condition is met.  
>>
>>However, "mesh(y,x,z)" works.  Is it the case that the documentation and
>>error message are incorrect, or is mesh implemented backwards?  (Or am I
>>going crazy?)
>
>----------------------------------------------------------------------
>Erich Schneider, Dipl.-Phys.     | address@hidden
>Neurologische Forschung          | address@hidden
>Ludwig-Maximilians-Universit"at  | 
>Klinikum Grosshadern, M"unchen   | Fax: +49,89,70906,101
> 



reply via email to

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