passing parameters to dynamically-linked functions
John W. Eaton
jwe at bevo.che.wisc.edu
Tue Aug 5 22:18:43 CDT 2008
On 31-Jul-2008, Thomas L. Scofield wrote:
|
| Parameters in Matlab are often passed in the manner
|
| functionName ( ..., 'parameterName', 'parameterValue' )
|
| I am wondering if there is an established approach for organizing
| such parameters, perhaps in a cell array(?), so that they are easily
| passed on to and parsed within a dynamically-linked function.
| Perhaps the kind of answer I am looking for goes like this: "for an
| example, see the m-file ______ which accepts additional parameters
| like these and then passes them along to the dynamically-linked
| function _______."
I can't think of a specific example, but I think you would probably
want to call the dynamically linked function from the .m file with
args = varargin(first_parameter_arg:end);
dynamically_linked_function (..., args{:});
or similar so that the dynamically linked function just sees a normal
argument list in an octave_value_list object..
Does that help?
jwe
More information about the Octave-maintainers
mailing list