Use library functions by a short name
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.
f1, f2, …) use(
use(L, f) 'exports' the public function
L to the global namespace such that
it can be accessed as
f without the prefix
use(L) exports all public functions of the
The standard way of accessing the function
L is via
f is exported,
you can call it simply as
f. Technically, exporting
means that the global identifier
f is assigned
L::f. Alternatively, when the option
Undoing the export of the library function
that the value of the global identifier
f is deleted.
Afterwards, the library function is available only as
use(L, f1, f2, ...) exports the specified
f1, f2, ... of the library
If one of the identifiers already has a value, the corresponding function
is not exported. Instead,
use prints a warning.
If one of the identifiers is not the name of a public library
use throws an error.
A function that is already exported cannot be exported the second time.
use evaluates its first argument
but it does not evaluate the remaining arguments
displays the interface functions and the exported functions of a library.
Some libraries have functions that are always exported. You
cannot undo the export for these functions. The function
append from the library
such an example.
When a function is exported, it is assigned to the corresponding global identifier. When you undo the export, the corresponding identifier is deleted.
Export the function
invphi of the library numlib,
and then undo the export:
Export all functions of the library numlib:
Warning: Identifier 'divisors' already has a value. It is not exported. [use]
Warning: Identifier 'contfrac' already has a value. It is not exported. [use]
use issues warnings because
already available as global functions. For example, there is the global
contfrac function that
numerical arguments. Undo the export of the
use issues a warning if a function cannot
be exported since the corresponding identifier already has a value:
invphi := 17: use(numlib, invphi)
Warning: Identifier 'invphi' already has a value. It is not exported. [use]
null() of type
The names of the functions of a library
stored in the set
L::interface. This set is used
by the function
The names of functions exported from a library
stored in the set