Imagine I have a mupad-notebook myMupadNotebook.mn at the path 'C:\projectFolder\ABC\abc\'
. It calls the procedure MyMupadProcedure.mu which is located at 'C:\DEF\GHI\'
.
Now I have a Matlab script main.m at 'C:\projectFolder\XYZ\xyz\'
with the content:
nb = mupad('C:\projectFolder\ABC\abc\myMupadNotebook.mn');
status = evaluateMuPADNotebook(nb);
So it initializes a symbolic engine and executes the Mupad script. But the Mupad script requires to know where to find the procedure. So I can define some start-up commands (or a start-up script) within the Mupad Notebook with File->Properties->Start-up commands like this:
READPATH := "C:\DEF\GHI\";
read("MyMupadProcedure.mu");
But now I work on different machines and the absolute folder paths are different, but the relative paths are the same. How can I use my scripts on all machines?
In Matlab I'd just set the SearchPath on every machine and it works, is there something equivalent for Mupad?
Alternatively it would already help if I could pass a string from Matlab to Mupad and I'd just write the start-up commands in the header of my notebook and determine the relative path with Matlab functions. But all combinations of the following lines just do not work:
syms X
X = 'hello'
setVar(nb,'X',X)
evalin(nb,['X := "' X '"'])