Documentation Center

  • Trial Software
  • Product Updates

Pref::userOptions

Additional options when starting MuPAD

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Pref::userOptions()

Description

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.

Examples

Example 1

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

Pref::userOptions()
"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":

Pref::userOptions()
"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)]:
end_while:
opts := opts . [s]

delete s, opts, ind:

Return Values

User defined options as strings

Was this topic helpful?