# 2. Overview Mathematic¶

Miscellaneous
get_math_lib get_math_lib returns the name of the enabled math libray.
ode ode computes the solution of ordinary differential equation of the first order.
set_math_lib set_math_lib sets the math library.
solve solve calculates the solution of a non linear system.
Interpolation
akimaspline akimaspline computes an akima spline for a given x- and y-vector.
detect_peaks detect_peaks finds peaks and valleys in a given noisy signal. Only local minima and maxima detected where the difference between adjacent extreme values are greater than the threshold.
fspline fspline computes a fit spline for a given x- and y-vector.
interpol The interpol function executes a linear interpolation or cosine interpolation for the given x-coordinates.
moving_average The moving_average function calculates a moving average. This filter can be used to reduce random noise.
moving_median The moving_median function calculates a moving median. The function operates over a moving window of values. For each window, the middle value found in the window is used.
nonlin nonlin computes the parameters of a given (non linear) function so that the deviation of the function for the given data points is minimized.
polyfit polyfit finds the coefficients of a polynomial of degree N using the least squares method.
polyval polyval calculates the y coordinates of a polynomial of degree n evaluated at x.
pspline pspline computes a spline under tension for a given x and y vector. In contrast to the fspline function, the x-elements do not have to be sorted in increasing order.
rspline rspline computes a rational spline under tension for a given x and y vector.
sgolayfilt sgolayfilt computes a moving average using the Savitzky-Golay algorithm.
2D-Interpolation
akimaspline2 akimaspline2 executes a 2-dimensional “matrix to matrix” interpolation.
fspline2 fspline2 executes a 2-dimensional “matrix to matrix” interpolation.
griddata griddata creates a regular grid of arbitrarily distributed data triples.
interpol2 interpol2 executes a 2-dimensional “matrix to matrix” interpolation.
nonlin nonlin computes the parameters of a given (non linear) function so that the deviation of the function for the given data points is minimized.
reduce3d reduce3d removes data points from an x/y/z dataset.
rspline2 rspline2 executes a 2-dimensional “matrix to matrix” interpolation.
smooth2 smooth2 is a function to smooth a matrix using the Savitzky-Golay algorthim.
spline2 spline2 executes a 2-dimensional “matrix to matrix” interpolation.
FFT
conv The conv function combines two signals to form a new signal, for example, calculates the output signal for an input signal and the impulse response signal.
deconv The deconv performs the deconvolution of vector u and vector v.
fft The fft function computes the complex Fourier Transformation.
ifft Calculates the Inverse Fourier Transformation.
upfirdn upfirdn is a polyphase FIR resampling function.
Elementary Functions
abs abs calculates the absolute value of its argument.
all all checks if all elements of a vector or matrix are other than zero (0).
angle angle calculates the phase angles in radinas for each element of a complex array.
any any checks if any elements of a vector or matrix are zero.
ceil Calculates the ceiling of a value.
conj conj returns the complex conjugate of its parameter.
cumprod cumprod returns the cumulative product of each column of a matrix.
cumsum cumsum returns the cumulative sums of each column of a matrix.
diff diff computes differences such as the following: [x - x, x - x, … , x[n] - x[n-1]]
exp exp returns the exponential value of its parameter.
floor Returns the largest interger that is less than or equal to its argument.
fround fround rounds the elements of a matrix. The number of significant digits can be specified.
histc histc calculates a histogram.
histogram histogram calculates the histogram of a vector.
imag imag returns the imaginary part of a complex number.
log log returns the natural logarithm of its parameter.
log10 log10 returns the base-10 logarithm of its parameter.
mean mean returns the mean of its parameter. When the argument is a matrix, a row vector will be created containing the mean values of the matrix columns.
merge merge merges two sorted vectors and returns a single sorted vector.
quantile quantile returns quantile of a data vector rvX for the cumulative probability rvP in the interval 0 to 1. For rvP = 0.5 the median is returned. For rvP = 1 the maximum is returned.
real real returns the real part of its argument.
remove remove removes all elements with the value 0 or rsRemove from a real vector. In case of a matrix all rows with the value 0 or rsRemove in the first column will be removed.
round Is replaced by fround.
sort sort performs a sort from a real, complex or string matrix or vector.
sqrt sqrt calculate the square root of a matrix.
std std returns the standard deviation of its parameter.
sum sum computes the sum of all elements for a real or complex vector. Strings from string vectors will be appended to a scalar string. When the argument is a matrix, a row vector will be created containing the sum of the matrix columns.
Trigonometric Functions
acos acosh calculates the arccosine.
acosh acosh calculates the hyperbolic arccosine.
acot acot calculates the arccotangent.
asin asin calculates the ac arcsine.
asinh asinh calculates the hyperbolic arcsine.
atan atan2 calculates the four-quadrant inverse tangent.
atanh atanh calculates the hyperbolic arctangent.
cos cos returns the cosine of its parameter.
cosh cosh returns the hyperbolic cosine of its parameter.
sin sin returns the sine of m.
sinh sinh returns the hyperbolic sine of its parameter.
tan tan returns the tangent of its parameter.
tanh tanh returns the hyperbolic tangent of its parameter.
Special Functions
besseli Modified Bessel function of the first kind.
besselj Bessel function of the first kind.
erf erf calculates the error function: .
Matrix Creation
diag diag creates a diagonal-matrix or a row-vector.
eye eye returns an identity matrix.
ones ones creates a real matrix with all elements set to the value 1.0.
rand rand returns random numbers with uniform distribution.
zeros The zeros function creates a real matrix with all elements set to the value 0.0.
Linear Algebra
cond cond calculates the condition number of a matrix.
det det computes the determinant of a square matrix.
eig eig calculates the eigenvalues and eigenvectors of a square matrix.
integral integral computes an approximation of the integral via the trapezoidal method.
inv inv calculates the inverse of a square matrix.
norm norm calculates various matrix norms.
pinv pinv calculates the pseudoinverse of a given matrix.
svd Singular value decomposition.
Random Numbers
rand rand returns random numbers with uniform distribution.
srand srand sets a start value for the random generator.

id-1159189