From: Paul on
"Steven Lord" <slord(a)mathworks.com> wrote in message <hupom4$mlj$1(a)fred.mathworks.com>...

> Write an "interface" function that calls INPUT, gets the data, and calls the
> main workhorse function. That way you can either call the INPUT-based
> interface or the main workhorse function directly depending on whether you
> want interactive input or not.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Thanks, but I'm trying to avoid changing the script. The script is third party, and I get a new one frequently. I would like to avoid adding a maintenance point that requires changing the third party script each time I get a new one.
From: Steven Lord on

"Paul " <pgottschalk(a)pixel-velocity.com> wrote in message
news:huqmh2$988$1(a)fred.mathworks.com...
> "Steven Lord" <slord(a)mathworks.com> wrote in message
> <hupom4$mlj$1(a)fred.mathworks.com>...
>
>> Write an "interface" function that calls INPUT, gets the data, and calls
>> the main workhorse function. That way you can either call the
>> INPUT-based interface or the main workhorse function directly depending
>> on whether you want interactive input or not.
>>
>> --
>> Steve Lord
>> slord(a)mathworks.com
>> comp.soft-sys.matlab (CSSM) FAQ:
>> http://matlabwiki.mathworks.com/MATLAB_FAQ
>> To contact Technical Support use the Contact Us link on
>> http://www.mathworks.com
>
> Thanks, but I'm trying to avoid changing the script. The script is third
> party, and I get a new one frequently. I would like to avoid adding a
> maintenance point that requires changing the third party script each time
> I get a new one.

Can you ask the third party to modify the process they use for generating
the script to avoid the INPUT call in the main workhorse function, allowing
you the user to choose how to obtain the data that you pass into the
workhorse? That way you could have different interface functions for
getting the data via INPUT, from a file, from a hardware device, from a GUI,
etc. without changing the workhorse.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com