Path: news.mathworks.com!not-for-mail
From: "us " <us@neurol.unizh.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: length of array
Date: Mon, 30 Jul 2007 17:26:41 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 16
Message-ID: <f8l70h$mr4$1@fred.mathworks.com>
References: <f8l6hk$epd$1@fred.mathworks.com>
Reply-To: "us " <us@neurol.unizh.ch>
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 1185816401 23396 172.30.248.36 (30 Jul 2007 17:26:41 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 30 Jul 2007 17:26:41 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:421723


P Sherry:
<SNIP cell acrobatics...

> P{a,b}
> how do i find the length of P{2,b}...

one of the solutions

     c={
          1:2     1:3
          1:4     1:5
          1:6     1:7
     };
     n=cellfun(@length,c(:,2))

us