(Not recommended) Read MuPAD program file into symbolic engine
read(symengine,...) is not recommended. Use equivalent Symbolic Math Toolbox™ functions that replace MuPAD® functions instead. For more information, see Compatibility Considerations.
Read MuPAD Program File into Symbolic Engine
Suppose you wrote the MuPAD procedure
myProc and saved it in the file
Before you can call this procedure at the MATLAB® Command Window, you must read the file
the symbolic engine. To read a program file into the symbolic engine, use
If the file is not on the MATLAB path, specify the full path to this file. For example, if
myProcedure.mu is in the
MuPAD folder on disk
feval(symengine, 'myProc', 10)
ans = 3628800
filename — name of a MuPAD program file
Name of a MuPAD program file, specified as a character vector. This file must have the
If you do not specify the file extension,
readsearches for the file
filenameis a GNU® zip file with the extension
readuncompresses it upon reading.
filenamecan include full or relative path information. If
filenamedoes not have a path component,
readuses the MATLAB function
whichto search for the file on the MATLAB path.
readignores any MuPAD aliases defined in the program file. If your program file contains aliases or uses the aliases predefined by MATLAB, see Alternatives.
You also can use
feval to call the MuPAD
read function. The
read function available from the
MATLAB Command Window is equivalent to calling the MuPAD
read function with the
Plain option. It ignores any
MuPAD aliases defined in the program file:
feval(symengine, 'read',' "myProcedure.mu" ', 'Plain')
If your program file contains aliases or uses the aliases predefined by MATLAB, do not use
feval(symengine, 'read',' "myProcedure.mu" ')
Version HistoryIntroduced in R2011b
read(symengine,...) is not recommended
Symbolic Math Toolbox includes operations and functions for symbolic math expressions that parallel MATLAB functionality for numeric values. Unlike MuPAD functionality, Symbolic Math Toolbox functions enable you to work in familiar interfaces, such as the MATLAB Command Window or Live Editor, which offer a smooth workflow and are optimized for usability.
Therefore, instead of passing a MuPAD program file to
read, enter the equivalent
Symbolic Math Toolbox functionality into the MATLAB command line or Live Editor to work with symbolic math expressions. For a list
of available functions, see Symbolic Math Toolbox functions list.
To convert a MuPAD notebook file to a MATLAB live script file, see
If you cannot find the Symbolic Math Toolbox equivalent for MuPAD functionality, contact MathWorks Technical Support.
Although the use of
read is not recommended, there are no plans to remove it at this time.