Re: Passing MATLAB script as a function parameter
- From: Randy Poe <poespam-trap@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 09:30:39 -0800 (PST)
On Nov 30, 12:24 pm, "James " <jalanthomas_no_spamm...@xxxxxxxxxxx>
wrote:
If I have a MATLAB function, is there a way I can pass
a reference to another MATLAB script to that function?
What I would like to do is to use this referenced
[initialization] script to set several directory names to
be used by the function. I want to be able call the
function with different initialization scripts. This way,
my function has no dependency on exactly what the scripts
are. Together, a particular initialization script and the
common/generic function will be used for a given
application.
Or is there a better way to achieve this in MATLAB?
You should be able to pass in the name as a string
argument, which is then used in an EVAL call.
You'll have to decide if you want the EVAL to
take place in the function's scope or in the main
workspace.
- Randy
.
- References:
- Passing MATLAB script as a function parameter
- From: James
- Passing MATLAB script as a function parameter
- Prev by Date: Re: defining outputs of unknown size in a mex file
- Next by Date: Re: Passing MATLAB script as a function parameter
- Previous by thread: Passing MATLAB script as a function parameter
- Next by thread: Re: Passing MATLAB script as a function parameter
- Index(es):
Relevant Pages
|