bug in char, str2mat and strvcat behaviour?
Thorsten Meyer
thorsten.meyier at gmx.de
Fri Nov 14 16:34:56 CST 2008
Thorsten Meyer wrote:
> Why don't we just rename the existing char function implemented in src/strfns to strvcat and use it
> to reimplement char (and str2mat) as an m-file like this:
>
> function [chararray] = my_char (varargin);
> chararray = char(varargin);
> endfunction
>
unfortunately, this does not seem quite as good as I thought: matlab does
>> char({'a', 'b', '', 'c'})
ans =
a
b
c
>> >> strvcat({'a', 'b', '', 'c'})
ans =
a
b
c
The existing char function in octave shows the same behaviour as above. So it does neither behave
like matlab-char nor like matlab-strvcat.
Thorsten
More information about the Bug-octave
mailing list