Path: news.mathworks.com!not-for-mail
From: "Xiao " <viva_paradise@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Error using ==> cellfun
Date: Fri, 30 Jan 2009 08:19:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <glud5p$o60$1@fred.mathworks.com>
Reply-To: "Xiao " <viva_paradise@hotmail.com>
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 1233303545 24768 172.30.248.38 (30 Jan 2009 08:19:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 30 Jan 2009 08:19:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1681698
Xref: news.mathworks.com comp.soft-sys.matlab:514904


Hi all.                                      

I got the following error when executing my program

%Error using ==> cellfun%
%Input #2 expected to be a cell array, was double instead.%

How can I correct this error?

my program is attached as follows:

Thanks in advance.

network = cat(3, [   11  12  0;
                             0   0   11;
                             0   0   12;
                             0   0   0;
                             0   0   0 ], [21  22  0;
                                              0    0   21;
                                              0    0   22;
                                              0    0   0;
                                              0    0   0]);
ind = ~cellfun(@isempty,network);
[rx,cx,dx]=find(ind(:,sum(ind)>1));