help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

array of function handles


From: Francesco Potortì
Subject: array of function handles
Date: Tue, 18 Nov 2008 08:57:40 +0100

How do I initialise an array with anonymous function handles?  The less
ugly I came up with is this:

      distfunction{1} = @(x,w) min(x);
      distfunction{2} = @(x,w) max(x);
      distfunction{3} = @(x,w) mediandist(x,1);
      distfunction{4} = @(x,w) mediandist(x,w);

Any better way?

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]