Documentation

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.

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. 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 app 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 =
  1×375 char array
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?