extracting value from a vector

John W. Eaton jwe at octave.org
Tue Apr 21 15:29:33 CDT 2009


On 21-Apr-2009, Rob Mahurin wrote:

| On Apr 21, 2009, at 3:48 PM, John W. Eaton wrote:
| 
| > On 21-Apr-2009, Rob Mahurin wrote:
| >
| > | Would it make sense to modify deal.m to allow this use in a less
| > | cryptic way?  Here's a (partial) patch that allows the above with
| > | 	[a,b] = deal(v,"columns")
| >
| > The deal function just copies inputs to outputs, so currently your
| > example will do
| >
| >   octave:1> [a, b] = deal (1, "columns")
| >   a =  1
| >   b = columns
| >
| > I don't think any change to examine the values of the arguments to
| > deal and do something special will work.
| 
| 
| Well, it does work -- I guess the patch got stripped, so I'll try  
| again.  But maybe it's not a good idea :)

I meant that a change like this can't work without breaking the
current behavior of the deal function, so it's highly unlikely to be
accepted.

jwe


More information about the Help-octave mailing list