(Not recommended) Evaluate MuPAD expressions without specifying their arguments
evalin(symengine,...) is not recommended. Use equivalent Symbolic Math Toolbox™ functions that replace MuPAD® functions instead. For more information, see Compatibility Considerations.
evaluates the MuPAD expression result = evalin(symengine,MuPAD_expression)MuPAD_expression, and returns
result as a symbolic object. If MuPAD_expression
throws an error in MuPAD, then this syntax throws an error in MATLAB®.
[
lets you catch errors thrown by MuPAD. This syntax returns the error status in result,status]
= evalin(symengine,MuPAD_expression)status and the
error message in result if status is nonzero. If
status is 0, result is a symbolic object;
otherwise, it is a character vector.
Compute the eigenvalues of the following matrix:
evalin(symengine,'linalg::eigenvalues(matrix([[x,y],[y,x]]))')
ans = [x + y, x - y]
Results returned by evalin can differ from the results that you get
using a MuPAD notebook directly. The reason is that evalin sets a lower
level of evaluation to achieve better performance.
evalin does not open a MuPAD notebook, and therefore, you cannot use this function to access MuPAD graphics capabilities.