Skip to Main Content Skip to Search
Product Documentation

getVar - Get variable from MuPAD notebook

Syntax

y = getVar(nb,'z')

Description

y = getVar(nb,'z') assigns the symbolic variable z in the MuPAD notebook nb to a symbolic variable y in the MATLAB workspace.

Examples

Start a new MuPAD notebook and define a handle mpnb to that notebook:

mpnb = mupad;

In the MuPAD notebook, enter the command f:=x^2. This command creates the variable f and assigns the value x^2 to this variable. At this point, the variable and its value exist only in MuPAD. Now, return to the MATLAB Command Window and use the getVar function:

f = getVar(mpnb,'f')

After you use getVar, the variable f appears in the MATLAB workspace. The value of the variable f is x^2.

See Also

mupad | setVar

  


Free Symbolic Math Interactive Kit

See how symbolic computations can help you find analytical solutions to math and engineering problems.

Get free kit

Trials Available

Try the latest version of symbolic math products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS