cat with empty matrix

David Bateman David.Bateman at motorola.com
Tue Nov 4 09:50:29 CST 2008


Phil Fong wrote:
> cat with an empty matrix behaves differently in Octave 3.0.3 than in Matlab 7.3.
> In Octave:
> octave:18> cat(2,[],1)
> error: octave_base_value::reshape (): wrong type argument `scalar'
>
> In Matlab:
>   
>>> cat(2,[],1)
>>>       
> ans =
>      1
>
> Obviously, in actual use the empty matrix is usually a variable rather than a literal empty matrix.
>   
Try the attached patch.. Jaroslav can you apply this to 3.0.3+ as well?

D.


-- 
David Bateman                                David.Bateman at motorola.com
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch8800
Url: https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081104/33c55804/attachment.ksh 


More information about the Bug-octave mailing list