This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Additional options when starting MuPAD

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.




Pref::userOptions() returns additional options, given by the user when calling MuPAD®.

When starting the MuPAD kernel with the flag "-U" the user can define options that can be used in the MuPAD session.


Example 1

If you start MuPAD with the command mupad -U "Hello World", Pref::userOptions returns the string "Hello World":

"Hello World"

Example 2

To define several user options one can use a separator between the strings. MuPAD is called with mupad -U "myhome,/home/user/myhome,2":


The following call splits the string into the three parts (to demonstrate, the string is written explicitely):

s := "myhome,/home/user/myhome,2":
opts := []:
ind := 0:
while (ind := stringlib::contains(s, ",", Index)) <> FALSE do
  opts := opts . [s[1 .. ind-1]];
  s := s[ind+1 .. length(s)]:
opts := opts . [s]

delete s, opts, ind:

Return Values

User defined options as strings

Was this topic helpful?