setVar - Assign variable in MuPAD notebook
Syntax
setVar(nb, y)
setVar(nb, 'v', y)
Description
setVar(nb, y) assigns the symbolic expression y in
the MATLAB workspace to the variable y in
the MuPAD notebook nb.
setVar(nb, 'v', y) assigns the symbolic
expression y in the MATLAB workspace to the
variable v in the MuPAD notebook nb.
Examples
mpnb = mupad;
syms x;
y = exp(-x);
setVar(mpnb,y)
setVar(mpnb,'z',sin(y))
After executing these statements, the MuPAD engine associated
with the mpnb notebook contains the variables y,
with value exp(-x), and z, with
value sin(exp(-x)).
See Also
getVar, mupad
 | rsums (sym) | | simple (sym) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit