help-octave
[Top][All Lists]
Advanced

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

Re: cellfun


From: Judd Storrs
Subject: Re: cellfun
Date: Thu, 9 Sep 2010 09:30:44 -0400

On Thu, Sep 9, 2010 at 5:46 AM, Francesco Potortì <address@hidden> wrote:
I seem to miss something.  Is this normal?

This looks to be a bug in octave's cellfun(). I asked a friend to try your code in a commercial implementation of an octave-similar numeric environment and this was the result:

>> rfh = @(r) feval (r, 'state', 1);
>> rfh(@rand)
>> a = rfh(@rand)
??? Error using ==> rand
Too many output arguments.

Error in ==> @(r)feval(r,'state',1)


>> cellfun(rfh, {'rand'})           
>> a = cellfun(rfh, {'rand'})
??? Error using ==> rand
Too many output arguments.

Error in ==> @(r)feval(r,'state',1)

I think the issue is that octave's cellfun doesn't understand what to do for functions that don't return a value. I would file a bug on the tracker.


--judd

reply via email to

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