STRCAT is not compatible

Ben Abbott bpabbott at mac.com
Thu Feb 21 06:10:55 CST 2008


On Feb 20, 2008, at 11:30 PM, John W. Eaton wrote:

> On 20-Feb-2008, Ben Abbott wrote:
>
> | I'll think this over. If no one else comes up with a solution, I'll
> | take a shot at it.
>
> OK.  Another thing to look at is what hapens for trailing whitespace.
> For example, try
>
>  strcat ('foo ', 'bar')
>  strcat ('foo', ' ', 'bar')
>
>  strcat ({'foo '}, {'bar '})
>  strcat ({'foo'}, {' '}, {'bar'})
>
> in Matlab.
>
> Compatibility with this behavior will cause some trouble for existing
> Octave code.
>
> jwe

hmmm ... It appears that the Matlab version converts string data to  
cells of strings before doing its work.

Where will this cause trouble?

Ben




More information about the Bug-octave mailing list