Path: news.mathworks.com!not-for-mail
From: "yunzhi cheng" <sjtu_yh@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: strange problem
Date: Tue, 31 Jul 2007 14:59:39 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 6
Message-ID: <f8nior$82s$1@fred.mathworks.com>
Reply-To: "yunzhi cheng" <sjtu_yh@yahoo.com>
NNTP-Posting-Host: webapp-01-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185893979 8284 172.30.248.36 (31 Jul 2007 14:59:39 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jul 2007 14:59:39 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 924303
Xref: news.mathworks.com comp.soft-sys.matlab:421859


I use length function to get the row number for one matrix.
a=[1 2;3 4];
length(a(:,1))% should be 2
It works well. But today it does not work.
when I use length(a(:,1)),it said"??? Index exceeds matrix dimensions."
It is very strange.