[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: char behavior
From: |
Ben Abbott |
Subject: |
Re: char behavior |
Date: |
Sat, 08 Oct 2011 23:35:23 -0400 |
On Oct 8, 2011, at 11:04 PM, Rik <address@hidden> wrote:
> On 10/08/2011 06:47 PM, address@hidden wrote:
>> Running the developers sources (default branch), I see ...
>>
>> size (char (1, 0))
>> ans = 2 1
>>
>> Does anyone else see this?
>>
>> Ben
> Yes. This is what you expect. char() takes its arguments and concatenates
> them vertically. There were two input arguments so the resulting 2-D
> character array will have two rows.
>
> It's easier to see with this code:
>
> char (97, 98)
> ans =
>
> a
> b
>
> size (ans)
> ans =
>
> 2 1
>
> --Rik
There is an incompatibility problem.
With char(M,N) ML returns a character array with size [MxN]
Thus, char() should behave like ones(), zeros(), cell(), etc.
Ben
>