bug in char, str2mat and strvcat behaviour?

Thorsten Meyer thorsten.meyier at gmx.de
Fri Nov 7 04:58:53 CST 2008


Søren Hauberg wrote:
> fre, 07 11 2008 kl. 00:09 +0100, skrev Thorsten Meyer:
>> Could someone with access to matlab please try, what really happens for the above
>> examples?
> 
> With Matlab 7.6.0.324 (R2008a) I get
> 
>>> str2mat ('a', 'b', '', 'c')
> 
> ans =
> 
> a
> b
>  
> c
> 
>>> char ('a', 'b', '', 'c')
> 
> ans =
> 
> a
> b
>  
> c
> 
>>> strvcat ('a', 'b', '', 'c')
> 
> ans =
> 
> a
> b
> c
> 
> So, the only difference seems to be in the 'char' function.
> 
> Søren

Thanks at lot. So char has a bug. Or maybe the problem lies even deeper:

octave:39> c=["a";"b";"";"d"]
c =

a
b
d

Is that compatible behaviour?

Could some of the c++ gurus help with this, please? I have tried to find what happens in the source
code but got terribly lost in all these overloaded methods for convert_to_str_internal (even with
the help of doxygen).

Regards

Thorsten


More information about the Bug-octave mailing list