[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need some help with Oct files
From: |
John W. Eaton |
Subject: |
Re: Need some help with Oct files |
Date: |
Tue, 5 Sep 2006 09:52:29 -0400 |
On 5-Sep-2006, Michael Creel wrote:
| You need to return an octave_list_value. Something like the following
| (taken from samin.cc in octave-forge):
|
| f_return(0) = xopt;
| f_return(1) = fopt;
| f_return(2) = converge;
| return octave_value_list(f_return);
More like
octave_value_list retval;
retval(2) = converge;
retval(1) = fopt;
retval(0) = xopt;
return retval;
Since the list has to be declared before it can be used.
The () operator forces a resize of the list automatically, so loading
the values in reverse order requires just one resize.
jwe