Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Recursive anonymous function
Date: Mon, 9 Mar 2009 08:07:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 10
Message-ID: <gp2in5$pro$1@fred.mathworks.com>
References: <gp22jh$sif$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
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 1236586021 26488 172.30.248.38 (9 Mar 2009 08:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 9 Mar 2009 08:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:523417


"Brandon" <bnavra.remove.this@student.usyd.edu.au.remove.this> wrote in message <gp22jh$sif$1@fred.mathworks.com>...

> iff = @(cond,t,f)((cond==true).*t + (cond==false).*f);
> 

This barely returns the right output but far from imitating the if-else branching (or logical short cut operator). This property is needed to fold and unfold the recursion correctly.

I don't even look at the rest of your post.

Bruno