octave-maintainers
[Top][All Lists]
Advanced

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

Re: concatenation bug?


From: John W. Eaton
Subject: Re: concatenation bug?
Date: Fri, 13 Apr 2007 10:12:06 -0400

On 12-Apr-2007, Christopher Hulbert wrote:

| On 4/12/07, John W. Eaton <address@hidden> wrote:
| > Is there some reason that the following must fail?
| >
| >   x = {1, 2};
| >   [x, @sin]
| >   error: concatenation operator not implemented for `cell' by `function 
handle' operations
| >
| > It seems that Matlab barfs on this as well, but I don't see why.
| 
| I'm not sure either. It seems that Matlab tries to evaluation the
| function handle in the concatenation? Note that the following will
| work in Matlab (not sure if this is exactly what you want though).
| 
| >> x=1;y=2;args={x,y};
| >> args={args{:},@sin}

Yes, that's the approach I ended up using for the code I was writing
that needed this concatenation.

Thanks,

jwe


reply via email to

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