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.

Functions

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)

Topics

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™.