Path: news.mathworks.com!not-for-mail
From: "Kenneth Eaton" <Kenneth.dot.Eaton@cchmc.dot.org>
Newsgroups: comp.soft-sys.matlab
Subject: Recursive anonymous function
Date: Mon, 9 Mar 2009 14:09:02 +0000 (UTC)
Organization: Cincinnati Children's Hospital Research Center
Lines: 5
Message-ID: <gp37tu$qq9$1@fred.mathworks.com>
References: <gp22jh$sif$1@fred.mathworks.com> <gp37gp$s3l$1@fred.mathworks.com>
Reply-To: "Kenneth Eaton" <Kenneth.dot.Eaton@cchmc.dot.org>
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 1236607742 27465 172.30.248.37 (9 Mar 2009 14:09:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 9 Mar 2009 14:09:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1165924
Xref: news.mathworks.com comp.soft-sys.matlab:523479


Actually, here's a new way to declare FACT without using feval:

>> fact = @(val,branchFcns) val*branchFcns{(val <= 1)+1}(val-1,branchFcns);

Ken