How do I locally run and publish a script that resides in a different directory?

2 views (last 30 days)
I am trying to use a Linux shell script to repeatedly publish a Matlab .m script (that calls multiple sub-scripts and functions from a common subdirectory). I also need it to read user input (in .m format) from a seperate working directory and create the output in that working directory. I can't seem to get Matlab to keep track of both directories (i.e. the "source" directory and the "working" directory). The "source" directory (and subdirectory) should be constant and read-only. The "working" directory should be the directory I am currently in which contains the shell script I am using to run/publish the code and my input files.
Essentially what I want to do is treat the source script(s) as if it were a compiled executable for QA purposes without actually compiling it (since publish doesn't work with compiled code). I want to store the main code in a designated location and run it from my working directory multiple times with diferent input file selections.

Answers (0)

Categories

Find more on Search Path in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!