symbolic

Adds symbolic calculation features to GNU Octave. These include common Computer Algebra System tools such as algebraic operations, calculus, equation solving, Fourier and Laplace transforms, variable precision arithmetic and other features. Compatibility with other symbolic toolboxes is intended.

Select category:

Main functions

syms
Create symbolic variables and symbolic functions.
@sym/sym
Define symbols and numbers as symbolic expressions.
vpa
Create a variable-precision floating point number.
sympref
Preferences for the Symbolic package.
vpasolve
Numerical solution of a symbolic equation.

Assumptions

assume
Specify assumptions for a symbolic variable (replace existing).
assumptions
List assumptions on symbolic variables.
@sym/assume
New assumptions on a symbolic variable (replace old if any).
@sym/assumeAlso
Add additional assumptions on a symbolic variable.

Symbolic Constants

catalan
Return Catalan constant.
eulergamma
Return Euler–Mascheroni constant.

Functions

cell2sym
Convert cell array to symbolic array.
digits
Set/get number of digits used in variable precision arith.
dirac
Compute the Dirac delta (generalized) function.
fibonacci
Return symbolic Fibonacci numbers or Fibonacci polynomials.
findsymbols
Return a list (cell array) of the symbols in an expression.
finiteset
Return a symbolic set containing the inputs without duplicates.
heaviside
Compute the Heaviside unit-step function.
laguerreL
Evaluate Laguerre polynomials.
lambertw
Compute the Lambert W function of Z.
poly2sym
Create a symbolic polynomial expression from coefficients.

Double-precision numerical functions

@double/adjoint
Numerical Classical Adjoint / Adjugate of a square matrix.
@double/bernoulli
Numerically evaluate Bernoulli numbers and polynomials.
@double/chebyshevT
Numerically evaluate Chebyshev polynomials of the first kind.
@double/chebyshevU
Numerically evaluate Chebyshev polynomials of the second kind.
@double/coshint
Numerical coshint function.
@double/cosint
Numerical cosint function.
@double/dilog
Numerical dilogarithm function
@double/euler
Numerical Euler numbers or Euler polynomials.
@double/fresnelc
Numerical fresnelc function.
@double/fresnels
Numerical fresnels function.
@double/harmonic
Numerical harmonic function.
@double/logint
Numerical logint function.
@double/pochhammer
Numerically evaluate the Rising Factorial or Pochhammer symbol.
@double/polylog
Numerical polylogarithm function
@double/sinhint
Numerical sinhint function.
@double/sinint
Numerical sinint function.
@double/zeta
Numerical zeta function.

Mathematical methods for symbolic objects

@sym/abs
Symbolic abs function.
@sym/acosd
Symbolic inverse cos function with output in degrees.
@sym/acosh
Symbolic acosh function.
@sym/acos
Symbolic acos function.
@sym/acoth
Symbolic acoth function.
@sym/acot
Symbolic acot function.
@sym/acsch
Symbolic acsch function.
@sym/acsc
Symbolic acsc function.
@sym/adjoint
Adjoint/Adjugate of a symbolic square matrix.
@sym/airy
Symbolic Airy functions of first/second kind and their derivatives.
@sym/angle
Symbolic polar angle.
@sym/arg
Symbolic polar angle.
@sym/asech
Symbolic asech function.
@sym/asec
Symbolic asec function.
@sym/asind
Symbolic inverse sin function with output in degrees.
@sym/asinh
Symbolic asinh function.
@sym/asin
Symbolic asin function.
@sym/atan2
Return an angle from a point given by symbolic expressions.
@sym/atand
Symbolic inverse tan function with output in degrees.
@sym/atanh
Symbolic atanh function.
@sym/atan
Symbolic atan function.
@sym/bernoulli
Return symbolic Bernoulli numbers or Bernoulli polynomials.
@sym/besselh
Symbolic Hankel functions of first/second kind.
@sym/besseli
Symbolic modified Bessel function of the first kind.
@sym/besselj
Symbolic Bessel function of the first kind.
@sym/besseljn
Symbolic Spherical Bessel function of the first kind.
@sym/besselk
Symbolic modified Bessel function of the second kind.
@sym/bessely
Symbolic Bessel function of the second kind.
@sym/besselyn
Symbolic Spherical Bessel function of the second kind.
@sym/beta
Beta function.
@sym/cart2pol
Transform symbolic Cartesian coordinates into polar or cylindrical.
@sym/cbrt
Symbolic cbrt function.
@sym/ceil
Symbolic ceil function.
@sym/charpoly
Characteristic polynomial of symbolic matrix.
@sym/chebyshevT
Find the nth symbolic Chebyshev polynomial of the first kind.
@sym/chebyshevU
Find the nth symbolic Chebyshev polynomial of the second kind.
@sym/chol
Cholesky factorization of symbolic symmetric matrix.
@sym/cond
Symbolic condition number of a symbolic matrix.
@sym/conj
Symbolic conjugate function.
@sym/cosd
Symbolic cos function with input in degrees.
@sym/coshint
Symbolic coshint function.
@sym/cosh
Symbolic cosh function.
@sym/cosint
Symbolic cosint function.
@sym/cos
Symbolic cos function.
@sym/coth
Symbolic coth function.
@sym/cot
Symbolic cot function.
@sym/cross
Symbolic cross product.
@sym/csch
Symbolic csch function.
@sym/csc
Symbolic csc function.
@sym/ctranspose
Conjugate (Hermitian) transpose of a symbolic array.
@sym/cumprod
Cumulative product over the rows or columns of a symbolic array.
@sym/cumsum
Cumulative sum over the rows or columns of a symbolic array.
@sym/curl
Symbolic curl of symbolic expression.
@sym/dawson
Symbolic Dawson (scaled imaginary error) function.
@sym/degree
Return the degree of a polynomial expression.
@sym/det
Symbolic determinant of a matrix.
@sym/diag
Make diagonal matrix or extract diagonal of symbolic matrix.
@sym/diff
Symbolic differentiation.
@sym/dilog
Symbolic dilogarithm function.
@sym/dirac
Symbolic dirac function.
@sym/divergence
Symbolic divergence of symbolic expression.
@sym/divisors
Get divisors of integer.
@sym/dot
Symbolic dot (scalar) product.
@sym/dsolve
Solve ordinary differential equations (ODEs) symbolically.
@sym/eig
Symbolic eigenvalues/eigenvectors of a matrix.
@sym/ei
Symbolic exponential integral (Ei) function.
@sym/ellipke
Complete elliptic integrals of the first and second kinds.
@sym/ellipticCE
Complementary complete elliptic integral of the second kind.
@sym/ellipticCK
Complementary complete elliptic integral of the first kind.
@sym/ellipticCPi
Complementary complete elliptic integral of the third kind.
@sym/ellipticE
Complete and incomplete elliptic integrals of the second kind.
@sym/ellipticF
Incomplete elliptic integral of the first kind.
@sym/ellipticK
Complete elliptic integral of the first kind.
@sym/ellipticPi
Complete and incomplete elliptic integrals of the third kind.
@sym/erfcinv
Symbolic erfcinv function.
@sym/erfc
Symbolic erfc function.
@sym/erfi
Symbolic erfi function.
@sym/erfinv
Symbolic erfinv function.
@sym/erf
Symbolic erf function.
@sym/euler
Return symbolic Euler numbers or Euler polynomials.
@sym/expint
Symbolic generalized exponential integral (expint) function.
@sym/exp
Symbolic exp function.
@sym/expm
Symbolic matrix exponential.
@sym/eye
Return an identity matrix.
@sym/factorial
Symbolic factorial function.
@sym/fix
Symbolic fix function.
@sym/floor
Symbolic floor function.
@sym/fourier
Symbolic Fourier transform.
@sym/frac
Return the fractional part of a symbolic expression.
@sym/fresnelc
Symbolic Fresnel Cosine function.
@sym/fresnels
Symbolic Fresnel Sine function.
@sym/gammainc
Symbolic regularized incomplete gamma function.
@sym/gammaln
Symbolic logarithm of the gamma function.
@sym/gamma
Symbolic gamma function.
@sym/gradient
Symbolic gradient of symbolic expression.
@sym/harmonic
Symbolic harmonic function.
@sym/heaviside
Symbolic Heaviside step function.
@sym/hessian
Symbolic Hessian matrix of symbolic scalar expression.
@sym/hilb
Return the symbolic Hilbert matrix.
@sym/horner
Convert a symbolic polynomial to Horner form.
@sym/hypergeom
Symbolic generalized hypergeometric function.
@sym/hypot
Return hypoteneuse (distance) from symbolic expressions.
@sym/ifourier
Symbolic inverse Fourier transform.
@sym/igamma
Symbolic upper incomplete gamma function.
@sym/ilaplace
Inverse Laplace transform.
@sym/imag
Imaginary part of a symbolic expression.
@sym/int
Symbolic integration.
@sym/intersect
Return the common elements of two sets.
@sym/interval
Return an interval.
@sym/invhilb
Return the symbolic inverse of the Hilbert matrix.
@sym/inv
Symbolic inverse of a matrix.
@sym/ismember
Test if an object is contained within a set or a matrix.
@sym/isprime
Return true if a symbolic number is prime.
@sym/jacobian
Symbolic Jacobian of symbolic expression.
@sym/jordan
Symbolic Jordan canonical form of a matrix.
@sym/kroneckerDelta
Kronecker Delta function.
@sym/kron
Kronecker tensor product of two or more symbolic matrices.
@sym/laguerreL
Symbolic Laguerre polynomials and associated Laguerre polynomials.
@sym/lambertw
Symbolic Lambert W function.
@sym/laplace
Laplace transform.
@sym/laplacian
Symbolic Laplacian of symbolic expression.
@sym/lu
Symbolic LU factorization of a matrix.
@sym/lgamma
Symbolic logarithm of the gamma function.
@sym/limit
Evaluate symbolic limits.
@sym/log10
Symbolic log base 10 function.
@sym/log2
Symbolic log base 2 function.
@sym/logint
Symbolic logint function.
@sym/log
Symbolic log function.
@sym/max
Return maximum value of a symbolic vector or vectors.
@sym/min
Return minimum value of a symbolic vector or vectors.
@sym/mod
Element-wise modular arithmetic on symbolic arrays and polynomials.
@sym/nchoosek
Symbolic binomial coefficient.
@sym/nextprime
Return the next prime number.
@sym/nnz
Number of non-zero elements in the symbolic array.
@sym/norm
Symbolic vector/matrix norm.
@sym/null
Basis for the nullspace of a symbolic matrix.
@sym/numden
Extract numerator and denominator of a symbolic expression.
@sym/orth
Orthonormal basis for column space (range) of symbolic matrix.
@sym/partfrac
Compute partial fraction decomposition of a rational function.
@sym/piecewise
Construct piecewise function.
@sym/pinv
Symbolic Moore-Penrose pseudoinverse of a matrix.
@sym/pochhammer
Rising Factorial or Pochhammer symbol.
@sym/polylog
Symbolic polylogarithm function.
@sym/potential
Symbolic potential of a vector field.
@sym/prevprime
Return the previous prime number.
@sym/prod
Product of symbolic expressions.
@sym/psi
Symbolic polygamma function.
@sym/qr
Symbolic QR factorization of a matrix.
@sym/rank
Rank of a symbolic matrix.
@sym/real
Real part of a symbolic expression.
@sym/round
Symbolic round function.
@sym/rref
Reduced Row Echelon Form of a symbolic matrix.
@sym/sech
Symbolic sech function.
@sym/sec
Symbolic sec function.
@sym/setdiff
Set subtraction.
@sym/setxor
Return the symmetric difference of two sets.
@sym/signIm
Return the sign of the imaginary part of a complex expression.
@sym/sign
Symbolic sign function.
@sym/sinc
Symbolic normalized sinc function.
@sym/sind
Symbolic sin function with input in degrees.
@sym/sinhint
Symbolic sinhint function.
@sym/sinh
Symbolic sinh function.
@sym/sinint
Symbolic sinint function.
@sym/sin
Symbolic sin function.
@sym/solve
Symbolic solutions of equations, inequalities and systems.
@sym/sqrt
Symbolic sqrt function.
@sym/ssinint
Symbolic shifted sine integral function.
@sym/sum
Sum of symbolic expressions.
@sym/svd
Symbolic singular value decomposition.
@sym/symprod
Symbolic product.
@sym/symsum
Symbolic summation.
@sym/tand
Symbolic tan function with input in degrees.
@sym/tanh
Symbolic tanh function.
@sym/tan
Symbolic tan function.
@sym/taylor
Symbolic Taylor series.
@sym/toeplitz
Construct a symbolic Toeplitz matrix.
@sym/trace
Trace of symbolic matrix.
@sym/transpose
Structural transpose (not conjugate) of a symbolic array.
@sym/tril
Lower-triangular part of a symbolic matrix.
@sym/triu
Upper-triangular part of a symbolic matrix.
@sym/union
Return the union of elements of two sets.
@sym/unique
Return the unique elements of a symbolic matrix.
@sym/zeta
Symbolic zeta function.
@sym/ztrans
Symbolic one-sided Z-transform.

Methods for manipulating symbolic objects:

@sym/argnames
Return the independent variables in a symfun.
@sym/char
Return string representation of a symbolic expression.
@sym/children
Return "children" (terms, lhs/rhs, etc) of symbolic expression.
@sym/coeffs
Return non-zero (or all) coefficients of symbolic polynomial.
@sym/equationsToMatrix
Convert set of linear equations to matrix form.
@sym/expand
Combine parts of a symbolic product.
@sym/factor
Factor a symbolic polynomial or integer.
@sym/findsym
Find symbols in expression, return them as comma-separated string.
@sym/find
Find non-zero or true entries of a symbolic matrix.
@sym/fliplr
Flip a symbolic matrix horizontally.
@sym/flipud
Flip a symbolic matrix vertically.
@sym/formula
Return a symbolic expression for this object.
@sym/has
Naively test if an expression contains a subexpression.
@sym/ipermute
Invert a permutation the indices of a symbolic array.
@sym/lhs
Left-hand side of symbolic expression.
@sym/permute
Permute the indices of a symbolic array.
@sym/rhs
Right-hand side of symbolic expression.
@sym/rewrite
Rewrite a symbolic expression.
@sym/subs
Replace symbols in an expression with other expressions.
@sym/symreplace
Replace symbols in caller’s workspace or in syms/struct/cells.
@sym/symvar
Find symbols in expression and return them as a symbolic vector.

Methods for converting symbolic objects to other formats

@sym/ccode
Convert symbolic expression into C code.
@sym/double
Convert symbolic to doubles.
@sym/eval
Symbolic expression to double, taking values from workspace.
@sym/fortran
Convert symbolic expression into Fortran code.
@sym/function_handle
Convert symbolic expression into a standard function.
@sym/latex
Display or return LaTeX typesetting code for symbolic expression.
@sym/matlabFunction
Convert symbolic expression into a standard function.
@sym/pretty
Return/display unicode/ascii-art representation of expression.
@sym/sym2poly
Return vector of coefficients of a symbolic polynomial.
@sym/sympy
The underlying SymPy representation as a string.

Arithmetic and logical methods for symbolic objects

@sym/all
Return true if all entries of a symbolic vector are nonzero.
@sym/any
Return true if any entries of a symbolic vector are nonzero.
@sym/and
Logical "and" of symbolic arrays.
@sym/eq
Test for symbolic equality, and/or define equation.
@sym/ge
Test/define symbolic inequality, greater than or equal to.
@sym/gt
Test/define symbolic inequality, greater than.
@sym/isallconstant
Whether all elements of a symbolic array are constant.
@sym/isAlways
Test if expression is mathematically true.
@sym/iscolumn
Return true if symbolic expression is a column vector.
@sym/isconstant
Indicate which elements of symbolic array are constant.
@sym/isempty
Return true a symbolic array is empty (one dimension is zero).
@sym/isequal
Test if contents of two or more arrays are equal.
@sym/isequaln
Test if contents of arrays are equal, even with nan.
@sym/isfinite
Is symbolic expression finite.
@sym/isinf
Return true if a symbolic expression is infinite.
@sym/ismatrix
Return true if this symbolic expression is a matrix.
@sym/isna
Symbolic expressions cannot be the Octave/R missing data NA.
@sym/isnan
Return true if a symbolic expression is Not-a-Number.
@sym/isNone
Return true if symbolic expression is Python object None.
@sym/isrow
Return true if symbolic expression is a row vector.
@sym/isscalar
Return true if this symbolic expression is a scalar.
@sym/isvector
Return true if this symbolic expression is a vector.
@sym/ldivide
Element-wise backslash division of symbolic expressions.
@sym/le
Test/define symbolic inequality, less than or equal to.
@sym/lt
Test/define symbolic inequality, less than.
@sym/minus
Subtract one symbolic expression from another.
@sym/mldivide
Symbolic backslash: solve symbolic linear systems.
@sym/mpower
Symbolic expression matrix exponentiation.
@sym/mrdivide
Forward slash division of symbolic expressions.
@sym/mtimes
Multiply symbolic matrices.
@sym/ne
Test/define symbolic inequality, not equal to.
@sym/not
Logical "not" of a symbolic array.
@sym/or
Logical "or" of symbolic arrays.
@sym/plus
Add two symbolic expressions together.
@sym/power
Symbolic expression componentwise exponentiation.
@sym/rdivide
Element-wise forward slash division of symbolic expressions.
@sym/times
Return Hadamard product (element-wise multiplication) of matrices.
@sym/uminus
Return the negation of a symbolic expression.
@sym/uplus
Symbolic unitary minus.
@sym/xor
Logical xor of symbolic arrays.

Other methods for symbolic objects

@sym/cat
Concatenate symbolic arrays along particular dimension.
@sym/colon
Generate a range of symbolic expressions.
@sym/columns
Return the number of columns in a symbolic array.
@sym/display
Display, on command line, the contents of a symbolic expression.
@sym/disp
Display the value of a symbolic expression.
@sym/end
Overloaded end for symbolic arrays.
@sym/ezcontour
Simple contour plots of symbolic expressions.
@sym/ezmesh
Simple 3D wireframe mesh plots of symbolic expressions.
@sym/ezplot3
Simple 3D parametric plotting of symbolic expressions.
@sym/ezplot
Simple plotting of symbolic expressions.
@sym/ezsurf
Simple 3D surface plots of symbolic expressions.
@sym/horzcat
Horizontally concatentate symbolic arrays.
@sym/length
Length of a symbolic vector.
@sym/linspace
Return a symbolic vector of equispaced points.
@sym/logical
Test if expression is "structurally" true.
@sym/logspace
Return a symbolic vector of logarithmically-spaced points.
@sym/numel
Return number of elements in symbolic array.
@sym/ones
Return a matrix whose elements are all 1.
@sym/repmat
Build symbolic block matrices.
@sym/reshape
Change the shape of a symbolic array.
@sym/resize
Resize a symbolic array, cropping or padding with zeros.
@sym/rows
Return the number of rows in a symbolic array.
@sym/simplify
Simplify an expression.
@sym/size
Return the size of a symbolic array.
@sym/sort
Order the elements in increasing order.
@sym/subsasgn
Assign to entries of a symbolic array.
@sym/subsindex
Used to implement indexing by sym.
@sym/subsref
Access entries of a symbolic array.
@sym/vertcat
Vertically concatentate symbolic arrays.
@sym/zeros
Return a matrix whose elements are all 0.

Class for symbolic functions

@symfun/argnames
Return the independent variables in a symfun.
@symfun/diff
Symbolic differentiation of symbolic functions.
@symfun/formula
Return a symbolic expression for this symfun.
@symfun/int
Symbolic integration of a symfun.
@symfun/isequal
Test if contents of two or more arrays are equal.
@symfun/isequaln
Test if contents of two or more arrays are equal, even with nan.
@symfun/ldivide
Component-wise backslash division of symbolic functions.
@symfun/minus
Subtract one symbolic function from another.
@symfun/mldivide
Backslash division of symbolic functions.
@symfun/mpower
Symbolic function exponentiation.
@symfun/mrdivide
Forward slash division of symbolic functions.
@symfun/mtimes
Multiply symbolic functions.
@symfun/numel
Number of elements in a symfun.
@symfun/plus
Add two symbolic functions together.
@symfun/power
Symbolic function component-wise exponentiation.
@symfun/rdivide
Forward slash component division of symbolic functions.
@symfun/size
Return the size of a symbolic function.
@symfun/subsref
Evaluate a symfun at a particular value.
@symfun/symfun
Define a symbolic function (not usually invoked directly).
@symfun/symvar
Find symbols in symfun and return them as a symbolic vector.
@symfun/times
Symbolic function component-wise multiplication.
@symfun/uminus
Return the negation of a symbolic function.

Miscellaneous

@logical/isAlways
Test if expression is mathematically true.

Deprecated

octsympy_tests
Run the test suite, log results, and return true if any fail.

Package: symbolic