a=1; a(1)=[] returns 0x0 rather than 1x0
John W. Eaton
jwe at octave.org
Wed Jan 14 14:08:25 CST 2009
On 22-Nov-2008, Garrett Euler wrote:
| --------
| Bug report for Octave 3.0.2 configured for x86_64-redhat-linux-gnu
|
| Description:
| -----------
|
| Setting the elements in a vector to [] results in a 0x0 matrix rather
| than a 1x0 as is returned in Matlab r14sp1 & r2007b (versions I have
| access to). The difference here is that Matlab preserves the variable
| as a vector while Octave does not.
|
| Repeat-By:
| ---------
|
| a=1
| a(1)=[]
|
|
| >From Matlab:
| --------
| >> a=1
|
| a =
|
| 1
|
| >> a(1)=[]
|
| a =
|
| Empty matrix: 1-by-0
This problem appears to be fixed in the current development sources.
jwe
More information about the Bug-octave
mailing list