Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Source Code of the MuPAD Library Functions

Note

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.

You can display the source code of the MuPAD built-in library functions. If you work in the MuPAD Notebook app, enter expose(name), where name is the library function name. The MuPAD Notebook displays the code as plain text with the original line breaks and indentations.

You can also display the code of a MuPAD library function in the MATLAB Command Window. To do this, use the evalin or feval function to call the MuPAD expose function:

sprintf(char(feval(symengine, 'expose', 'numlib::tau')))
ans =
    'proc(a)
       name numlib::tau;
     begin
       if args(0) <> 1 then
         error(message("symbolic:numlib:IncorrectNumberOfArguments"))
       else
         if ~testtype(a, Type::Numeric) then
           return(procname(args()))
         else
           if domtype(a) <> DOM_INT then
             error(message("symbolic:numlib:ArgumentInteger"))
           end_if
         end_if
       end_if;
       numlib::numdivisors(a)
     end_proc'

MuPAD also includes kernel functions written in C++. You cannot access the source code of these functions.

Was this topic helpful?