Opening a file and loading a function from another script
Show older comments
Hi,
I want to run a function from a .m file that is chosen by a user via something like uigetfile() while running another script. The function that will be called is the only function in the opened .m file and shares a common title with the .m file, but is in a different directory than the currently running script and takes in two input parameters. Someone helped me run a script from another script using run(fullfile(directory, fileName)), but I'm not sure if it'll work here. I also tried to use uigetfile to load the .m file containing the function and then call the function, but that didn't work either.
I'm not sure if I made myself totally clear with what I need. My MATLAB terminology isn't very good, but I'll be happy to clear things up for you as much as I can if anyone has any questions as to what my question is.
As always, any help is really appreciated.
Thanks, Dan
Accepted Answer
More Answers (0)
Categories
Find more on App Building in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!