Products & Services Solutions Academia Support User Community Company

Learn more about Symbolic Math Toolbox   

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS