Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Comma list with leading cell
Date: Sat, 23 May 2009 14:04:02 +0000 (UTC)
Organization: Xoran Technologies
Lines: 25
Message-ID: <gv8voi$kg2$1@fred.mathworks.com>
References: <gv8nju$kvn$1@fred.mathworks.com> <gv8r4e$19v$1@fred.mathworks.com> <gv8s49$2ua$1@fred.mathworks.com> <gv8t0d$rm7$1@fred.mathworks.com> <gv8tl1$81o$1@fred.mathworks.com> <gv8udd$pdc$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1243087442 20994 172.30.248.38 (23 May 2009 14:04:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 23 May 2009 14:04:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:541999


"us " <us@neurol.unizh.ch> wrote in message <gv8udd$pdc$1@fred.mathworks.com>...

> Matrices and arrays can be composed of elements of most any MATLAB data type as long as all elements in the matrix are of the same type. If you do include elements of unlike classes when constructing a matrix, MATLAB converts some elements so that all elements of the resulting matrix are of the same type. 
> ...
> that's the WITHIN rule DURING construction of a matrix when nothing is known about it, yet...

This also doesn't explain why the following does not work
------
>> a=num2cell(eye(2))

a = 

    [1]    [0]
    [0]    [1]

>> b=eye(2)

b =

     1     0
     0     1

>> [a,b]
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.