Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <brunoluong@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Bug in mat2cell?
Date: Sun, 25 Nov 2007 10:48:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <fibjt3$64b$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <brunoluong@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1195987683 6283 172.30.248.37 (25 Nov 2007 10:48:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 25 Nov 2007 10:48:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1184112
Xref: news.mathworks.com comp.soft-sys.matlab:439235



Hello

X=rand(2,2,2);
C=mat2cell(X,2,[1 1],[1 1]);

The last instruction produces the following error message,
which I think is a bug.

??? Index exceeds matrix dimensions.

Error in ==> mat2cell at 227
        c{cind} = x(tref{:});

My MATLAB version is 7.3.0.267 (R2006b).

Comments?

Bruno