From help-request at octave dot org Tue Feb 7 10:01:55 2006 Subject: Lists of function handles From: "John W. Eaton" To: Cc: Date: Tue, 7 Feb 2006 11:01:19 -0500 On 7-Feb-2006, andreas dot sodeur at rwe dot com wrote: | I am trying to create a list of function handles. This seems to be | possible in Matlab, but generates errors in Octave: | | >>function r = basisFunction1(x) | r = 1; | endfunction | | >>function r = basisFunction2(x) | r = x; | endfunction | | >>a(1) = at basisFunction1 | error: can't perform indexed assignment for function handle type | error: assignment failed, or no method for ` = function | handle' | error: evaluating assignment expression near line 1, column 6 | | Any work-around? Thx Yes, use cell arrays as David said. I just wanted to point out that in future versions of Matlab, you won't be able to use the style of indexing you show above. I think R14 gives a warning about it now. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------