How to run a function which is not on the path?
Show older comments
I would like to run a function which is not on MATLAB's path. Formerly I did this with evalf, but once I upgraded to R2012b, the program fails here:
str2func(funcNam)
Warning: The input to STR2FUNC
"S:/source/matlab/utils/graphics/distinguishable_colors" is not a
valid function name. This will generate an error in a future release.
So, is there another way to run a function if the function is not on the path? While it is possible to run a script which is not on the path, that doesn't help because I need the function's outputs. I don't want to add the directory to my path because it has so many directories that it is causing issues with performance. I suppose I could just change to the function's directory, run it, and change back to my initial directory. But perhaps there is a better solution.
Accepted Answer
More Answers (0)
Categories
Find more on Search Path 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!