[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pcolor in octave 3.0 requires same dimension
From: |
John W. Eaton |
Subject: |
Re: pcolor in octave 3.0 requires same dimension |
Date: |
Fri, 28 Dec 2007 16:03:56 -0500 |
On 28-Dec-2007, Kai Habel wrote:
| David Bateman schrieb:
| > Puck Ja wrote:
| >
| >> I just upgraded to octave 3.0 and was so glad to find "pcolor" is
| >> available without any addon, such as octplot. My main usage is to
| >> display a 2D matrix. However, one thing strange to me is that pcolor
| >> requires equal dimension (x=y) to work.
| >> octave:6> pcolor(mat)
| >> error: surface: x, y, and z must have same dimensions
| >> error: evaluating if command near line 95, column 7
| >> error: evaluating if command near line 87, column 5
| >> error: evaluating if command near line 76, column 3
| >> error: called from `surface:__surface__' in file
| >> `/usr/local/share/octave/3.0.0/m/plot/surface.m'
| >> error: called from `surface' in file
| >> `/usr/local/share/octave/3.0.0/m/plot/surface.m'
| >> error: evaluating assignment expression near line 48, column 7
| >> error: called from `pcolor' in file
| >> `/usr/local/share/octave/3.0.0/m/plot/pcolor.m'
| >>
| >> Why is that limitation. Certain I can work around it by making a larger
| >> square matrix and then using axis([x1 x2 y1 y2]) to make it display what
| >> I look for, but that is way to silly. Is there any other way to work
| >> around it?
| >>
| >> Thanks!
| >>
| >> Puck
| >>
| >>
| >
| > I suspect something like the attached is needed, but Kai should probably
| > comment.
| >
| > D.
| >
| Yes this should be fixed, like you and Soeren have proposed. The
| attached fix avoids an additional size call.
|
| Kai
|
|
| 2007-12-28 Kai Habel <address@hidden>
|
| * plot/pcolor.m: Swap 1st and 2nd argument for meshgrid call. Remove
| unnecessary call of size function.
I checked in this change on the cvs trunk and 3.0 release branch.
Thanks,
jwe