This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Conversion Between Symbolic and Numeric

Convert symbolic data to numerics, convert numerics to symbolic objects

Symbolic Math Toolbox™ lets you convert data between symbolic and commonly used MATLAB® data types. You can also perform numeric computations with high precision using variable-precision arithmetic.


cell2symConvert cell array to symbolic array
doubleConvert symbolic values to MATLAB double precision
poly2symCreate symbolic polynomial from vector of coefficients
symCreate symbolic variables, expressions, functions, matrices
sym2cellConvert symbolic array to cell array
sym2polyExtract vector of all numeric coefficients, including zeros, from symbolic polynomial
symfunCreate symbolic functions
vpaVariable-precision arithmetic (arbitrary-precision arithmetic)


Numeric to Symbolic Conversion

Convert floating-point numbers to exact symbolic numbers.

Increase Precision of Numeric Calculations

Increase precision arbitrarily with variable-precision arithmetic.

Compute Binomial Coefficients Exactly

This example shows how to get precise values for binomial coefficients and find probabilities in coin-tossing experiments using the Symbolic Math Toolbox.

Numerical Computations With High Precision

This example shows how to use variable-precision arithmetic to obtain high precision computations using Symbolic Math Toolbox™.

Decimal Digits of PI

This example shows how to use variable-precision arithmetic to investigate the decimal digits of pi using Symbolic Math Toolbox™.