From: Scott Tyler on 5 Jul 2010 09:42 I would like to pass an .m-file as an argument to a second .mfile. Can anyone suggest how I might do this? Thanks, Scott
From: Walter Roberson on 5 Jul 2010 10:54 Scott Tyler wrote: > I would like to pass an .m-file as an argument to a second .mfile. Can > anyone suggest how I might do this? The _name_ of a .m file is a string. The _content_ of a .m file is a character array or cell string array. What are you going to *do* with the .m file in the second .m file? If the first .m file is a function and you will need to invoke the function, consider passing a function handle.
From: us on 5 Jul 2010 12:08 "Scott Tyler" <styler(a)live.com> wrote in message <i0snfm$8n9$1(a)fred.mathworks.com>... > I would like to pass an .m-file as an argument to a second .mfile. Can anyone suggest how I might do this? > Thanks, > Scott a hint: - pass the name is a CHAR string, eg, fun('unique',...) - pass a FUNCTION HANDLE, eg, fun(@unique,...) us
From: Scott Tyler on 6 Jul 2010 11:26 Walter Roberson <roberson(a)hushmail.com> wrote in message <5nmYn.5816$xZ2.2398(a)newsfe07.iad>... > Scott Tyler wrote: > > I would like to pass an .m-file as an argument to a second .mfile. Can > > anyone suggest how I might do this? > > The _name_ of a .m file is a string. > The _content_ of a .m file is a character array or cell string array. > > What are you going to *do* with the .m file in the second .m file? If > the first .m file is a function and you will need to invoke the > function, consider passing a function handle.
From: Scott Tyler on 6 Jul 2010 11:30 Walter Roberson <roberson(a)hushmail.com> wrote in message <5nmYn.5816$xZ2.2398(a)newsfe07.iad>... > Scott Tyler wrote: > > I would like to pass an .m-file as an argument to a second .mfile. Can > > anyone suggest how I might do this? > > The _name_ of a .m file is a string. > The _content_ of a .m file is a character array or cell string array. > > What are you going to *do* with the .m file in the second .m file? If > the first .m file is a function and you will need to invoke the > function, consider passing a function handle. I tried passing a function handle and that worked well. Thanks, Scott
|
Pages: 1 Prev: Add texbox at a specified location Next: Java Bean Event Listener Callback Problem |