MtxVec Expression parser provides scripting support for MtxVec. The feature is provided by TMtxExpression component located in MtxParseExpr.pas unit. Below is the list of fuctions recognized by the script. The same scripting language is also used by Dew Debugger Visualizer. Please complement the following information with ExpressionParser.pdf and Dew Debugger Visualizer V2.pdf documents. Function listing: Abs(x): absolute value of 'x' ArcCos(x): inverse cosine of 'x' ArcCosh(x): inverse hyperbolic cosine of 'x' ArcCot(x): inverse cotangens of 'x' ArcCoth(x): inverse hyperbolic cotangens of 'x' ArcCsc(x): inverse cosecant of 'x' ArcCsch(x): inverse hyperbolic cosecant of 'x' ArcSec(x): inverse secant of 'x' ArcSech(x): inverse hyperbolic secant of 'x' ArcSin(x): inverse sine of 'x' ArcSinh(x): inverse hyperbolic sine of 'x' ArcTan(x): inverse tangens ArcTan(x,y): tangens defined as 'x'/'y' ArcTanh(x): inverse hyperbolic tangens of 'x' Arg(x): atan2(x.Im, x.Re) AutoCorrBiased(x, Lag): returns auto-correlation of x. AutoCorrNormal(x, Lag): returns auto-correlation of x. AutoCorrUnbiased(x, Lag): returns auto-correlation of x. BernoulliCDF(x, p): returns Bernoulli CDF in domain (x = 0/1) at value p. BernoulliCDFInv(y, p): returns inverse of the Bernoulli CDF at y. BernoulliPDF(x, p): returns Bernoulli PDF in domain (x = 0/1) at value p. (AMean, AVariance, ASkewness, AKurtosis) = BernoulliStat(p): returns Bernoulli PDF statistics in AMean, AVariance, ASkewness, AKurtosis. beta(x, y): returns the value of the beta function. BetaCDF(x, a, b): returns beta CDF at x. BetaCDFInv(p, a, b: double): returns inverse beta CDF at x. BetaIncomplete(x,a,b): returns the incomplete beta function. BetaPDF(x, a, b): returns beta PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = BetaStat(a, b): returns Beta PDF statistics in AMean, AVariance, ASkewness, AKurtosis. BinomCDF(x, n, p): returns binomial CDF at x. BinomCDFInv(y, n, p): returns inverse of binomial CDF at y. BinomPDF(x, n, p): returns binomial PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = BinomStat(n, p): returns Binomial PDF statistics in AMean, AVariance, ASkewness, AKurtosis. binomial(n, k): returns the binomial coefficient C(n,k). Boolean(x): converts integer 'x' value to boolean "true" if value is bigger than zero and "false" otherwise. BoseEinsteinCDF(x, mu, s): returns the bose-einstein CDF at x . BoseEinsteinPDF(x, mu, s): returns the bose-einstein PDF at x. (amplt, phase) = CartToPolar(x): converts cartesian coordinate to polar coordinate CauchyCDF(x, m, b): retruns the cauchy CDF at x. CauchyCDFInv(p,m,b): returns the inverse of the cauchy CDF at p. CauchyPDF(x, m, b): retruns the cauchy PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = CauchyStat(b, m): returns Cauchy PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Cbrt(x): computes the cube root 1/x^3 from the data in x. Ceil(x): the smallest integer greater than or equal to 'x' ChiSquareCDF(x, Nu): returns the ChiSquare CDF at x. ChiSquareCDFInv(p, Nu): returns the inverse of the ChiSquare CDF at p. ChiSquarePDF(x, Nu): returns the ChiSquare PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = ChiSquareStat(Nu): returns Chi Square PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Cholesky(x): returns true, if matrix is symmetric and positive definite. Cis(x): SinCos of 'x' (cos(x)+sin(x)*I) Cols(x): column count of matrix x CompareStr(a, b): returns 0 if both strings match with case sensitivity. CompareText(a, b): returns 0 if both strings match with case insensitivity. Conj(x): conjunction of 'x' value Convolve(Data, Filter): returns convolution of Data with Filter. Cos(x): cosine of 'x' Cosh(x): hyperbolic cosine of 'x' Cot(x): cotangens of 'x' Coth(x): hyperbolic cotangens of 'x' Cplx(x): convert x to complex Cplx(re,im): make complex value (re+im*I) CplxToStr(x): converts x from complex to string. CrossCorr(a, b, HiLag, LoLag, Norm): returns cross correlation between a and b. Norm 0 is default, 1 is biased and 2 is unbiased. Csc(x): cosecant of 'x' Csch(x): hyperbolic cosecant of 'x' CumSum(x): returns cumulative sum of data in vector x = [1,2,..] => y = [1,1+2,1+2+3,..] or columns in the matrix. DCT(x): returns discrete cosine transform of x Dct(x): returns discrete cosine transform of x (qoutiend, reminder) = Deconv(b, a), returns the quotiend of b/a and reminder in the parameter. DegToRad(x): converts 'x' degrees to radian Determinant(x): returns the determinant of the matrix. Diag(x, k): returns the diagonal of matrix x. The k parameter defines the offset from the main diagonal. Difference(x, lag): returns vector of differences between elements lag a part. DirectoryCreate("C:\Work\File.txt"): returns True, if the directory was created. DirectoryDelete("C:\Work\File.txt"): returns True, if the directory was deleted. DirectoryExists("C:\Work\File.txt"): returns True, if the directory exists. DirichletBeta(z): returns dirichlet beta function. DirichletEta(z): returns the dirichlet eta function with n = 64. DirichletEta(z, n): returns the dirichlet eta function with user specified n (approximation terms). DirichletLambda(z): returns dirichlet lambda with n = 64. DirichletLambda(z, n): returns dirichlet lambda with user specified n. DotProd(a,b): returns dot product between vectors a and b. DotProd(a, b, conj): returns dot product between complex vectors a and b and optionally conjugates b, if conj is True. Double(x): converts integer 'x' value to double Eig(x): returns eigevalues (d) of x Eig(x, l, r): returns eigevalues (d) and stores left eigenvectors in l and right eigenvectors in r. Erf(x): computes the error function from the data in x. ErfInv(x): computes inverse of the error function from the data in x. Erfc(x): computes completementary error function from the data in x. ErlangCDF(x, k, lambda): returns the Erlang CDF at x. ErlangCDFInv(p, k, lambda): returns the inverse of the Erlang CDF at p. ErlangPDF(x, k, lambda): returns the Erlang PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = ErlangStat(k, Lambda): returns Erlang PDF statistics in AMean, AVariance, ASkewness, AKurtosis. exp(x): e^ Exp10(x): 10^x Exp2(x): 2^x ExpCDF(x, mu): returns the Exponential CDF at x. ExpCDFInv(p, mu): returns the inverse Exponential CDF at p. ExpPDF(x, mu): returns the Exponential PDF at x. Expj(x): SinCos of 'x' (cos(x)+sin(x)*I) (AMean, AVariance, ASkewness, AKurtosis)= ExponentStat(Mu): returns Exponential PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Eye(r): returns square matrix size r x r of zeros with ones on the main diagonal. Eye(r,c): returns non-square matrix size r x c of zeros with ones on the main diagonal. FCDF(x, Nu1, Nu2): returns F CDF at x. FCDFInv(p, Nu1, Nu2): returns inverse of F CDF at p. FFT(x): returns 1D FFT of vector or of rows of matrices. FFT2D(x): returns 2D FFT of matrix x. FPDF(x, Nu1, Nu2): returns F PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = FStat(Nu1, Nu2): returns F PDF statistics in AMean, AVariance, ASkewness, AKurtosis. FatigueLifeCDF(x, mu, gamma, beta): returns Fatigue life CDF at x. FatigueLifeCDFInv(p, mu, gamma, beta): returns the inverse of Fatigue life CDF at p. FatigueLifePDF(x, mu, gamma, beta): returns Fatigue life PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = FatigueLifeStat(mu, gamma, beta): returns Fatigue Life PDF statistics in AMean, AVariance, ASkewness, AKurtosis. FermiDiracCDF(x, mu, s): returns Fermi Dirac CDF at x. FermiDiracPDF(x, mu, s): returns Fermi Dirac PDF at x. FileClose(aHandle): returns aHandle for the file in the path in parameter. To close the file call FileClose. FileCopy("Src.dat", "Dst.dat"): returns True, if the file was copied. FileDelete("C:\Work\File.txt"): returns True, if file was deleted. FileExists("C:\Work\File.txt"): returns True, if the file exists. FileMove("Src.dat", "Dst.dat"): returns True, if the file was moved. (aHandle) = FileOpen("C:\Work\File.dat"): returns aHandle for the file in the path in parameter. To close the file call FileClose. Pos = FilePosition(aHandle): returns the position Pos within the file designated with aHandle. Use OpenFile to obtain a file handle. a = FileRead(aHandle, "double"): reads a single double value from files current position with aHandle and stores it in a. Use OpenFile to obtain a file handle and CloseFile to close it. a = FileRead(aHandle, "double", Count): reads Count double value from files current position with aHandle and stores it in to vector a. Use OpenFile to obtain a file handle and CloseFile to close it. FileSetPosition(aHandle, Pos): seek to position Pos within the file designated with aHandle. Use OpenFile to obtain a file handle. size = FileSize(aHandle): returns the Size of he file designated with aHandle. Use OpenFile to obtain a file handle. FileWrite(aHandle, a): write contents of variable a to file designated with aHandle. Use OpenFile to obtain a file handle. FixAngle(x): moves big number in to interval [-Pi...Pi] to improve accuracy of angular functions like sin and cos. Flip(x): swaps real and image parts of complex value FlipHor(x): returns the matrix x flipped horizontally. FlipVer(x): returns the matrix x flipped vertically. Floor(x): the biggest integer less than or equal to 'x' FormatCplx(x, reFormat, imFormat): converts x from string according to format. Examples of good format values: " 0.###;-0.###", "+0.###i;-0.###i" FormatSample(x, format): converts x from string according to format. Frac(x): returns fractional part of a real number. Gamma(x): gamma function G(x) GammaCDF(x, a, b): returns Gamma CDF at x. GammaCDFInv(p, a, b): returns inverse Gamma CDF at p. GammaFrac(a, x): returns incomplete Gamma function : continued fraction expansion. GammaPDF(x, a, b): returns Gamma PDF at x. GammaSer(a, x): returns the value Incomplete Gamma function (series expansion). (AMean, AVariance, ASkewness, AKurtosis) = GammaStat(a, b): returns Gamma PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Gcd(x,y): greatest common divisor GenExtValueCDF(x, k, mu, sigma): returns generalized extreme value CDF at x. GenExtValuePDF(p, k, mu, sigma): returns inverse of generalized extreme value CDF at p. GenExtValuePDF(x, k, mu, sigma): returns generalized extreme value PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = GenExtValueStat(k, mu, sigma): returns Generealized extreme value PDF statistics in AMean, AVariance, ASkewness, AKurtosis. GenHarmonic(n, m): returns the generalized harmonic number H(n,m). GenParetoCDF(x, k, mu, sigma): returns generalized pareto CDF at x. GenParetoCDFInv(p, k, mu, sigma): returns inverse of generalized pareto CDF at p. GenParetoPDF(x, k, mu, sigma): returns generalized pareto PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = GenParetoStat(k, mu, sigma): returns Generealized Pareto PDF statistics in AMean, AVariance, ASkewness, AKurtosis. GeometricCDF(x, p): returns geometric CDF at x. GeometricCDFInv(y, p): returns inverse geometric CDF at y. GeometricPDF(x, p): returns geometric PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = GeometricStat(p): returns geometric PDF statistics ni AMean, AVariance, ASkewness, AKurtosis. GumbelCDF(x, mu, beta, minimum): returns Gumbel CDF at x. GumbelCDFInv(p, mu, beta, minimum): returns Gumbel PDF at p. GumbelPDF(x, mu, beta, minimum): returns Gumbel PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = GumbelStat(mu, beta): returns Gumbel PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Hankel(firstColumn): returns hankel matrix with first column vector specified as parameter. Harmonic(n): returns the harmonic number H(n). Hilbert(x): returns the hilbert transform of vector x or rows in matrix x. HypGeometricCDF(x, M, K, N): returns hypergeometric CDF at x. HypGeometricCDFInv(p, M, K, N): returns inverse hypergeometric CDF at p. HypGeometricPDF(x, M, K, N): returns hypergeometric PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = HypGeometric(M,K,N): returns Hyper Geometric PDF statistics in AMean, AVariance, ASkewness, AKurtosis. IDCT(x): returns inverse discrete cosine transform of x IFFT(x): returns 1D Inverse FFT of vector or of rows of matrices. IFFT2D(x): returns 2D Inverse FFT of matrix x. IFFT2DToReal(x): returns 2D Inverse real FFT of matrix x. IFFTToReal(x): returns 1D Inverse real FFT of vector or rows of matrices. IGamma(a, x): returns the incomplete gamma function. Idct(x): returns inverse discrete cosine transform of x Imag(x): image part of complex value IntPower(x,n): x^n IntToStr(x): converts x from integer to string. Integer(x): truncats 'x' value towards zero and returns integer Integrate(x): Integrate all elements in x once. Integrate(x, init): Integrate all elements in x using initial values in Init vector Length(Init) times. IntPow(x,n): x^n InverseChiSquareCDF(X, Nu): returns inverse Chi Square CDF at x. InverseChiSquareCDFInv(p, Nu): returns inverse of inverse Chi Square CDF at p. InverseChiSquarePDF(X, Nu): returns inverse Chi Square PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = InverseChiSquareStat(Nu): returns Inverse Chi-Square PDF statistics in AMean, AVariance, ASkewness, AKurtosis. InverseGaussianCDF(x, mu, lambda): returns inverse gaussian CDF at x. InverseGaussianCDFInv(x, mu, lambda): returns inverse of inverse gaussian CDF at p. InverseGaussianPDF(x, mu, lambda): returns inverse gaussian PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = InverseGaussianStat(mu, lambda): returns Inverse Gaussian PDF statistics in AMean, AVariance, ASkewness, AKurtosis. IsComplex(x): returns 1 if x is complex and 0 otherwise IsEqual(a, b): Returns true, if all elements of a and b are equal. Matrix dimensions are not compared. IsInf(x): TRUE if 'x' is INF IsInfNan(x): TRUE if 'x' is NAN or INF IsNaN(x): TRUE if 'x' is NAN IsNanInf(x): TRUE if 'x' is NAN or INF JGamma(a, x): returns the complement to the incomplete gamma function. JohnsonSBCDF(x, gamma,delta,lambda,xi): returns Johnson bounded (SB) CDF at x. JohnsonSBCDFInv(p, gamma,delta,lambda,xi): returns inverse of Johnson bounded (SB) CDF at x. JohnsonSBPDF(x, gamma,delta,lambda,xi): returns Johnson bounded (SB) PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = JohnsonSBStat(gamma ,delta, lambda, xi): returns Johnson bounded (SB) PDF statistics in AMean, AVariance, ASkewness, AKurtosis. JohnsonUBCDF(x, gamma,delta,lambda,xi): returns Johnson unbounded (UB) CDF at x. JohnsonUBCDFInv(p, gamma,delta,lambda,xi): returns inverse of Johnson unbounded (UB) CDF at x. JohnsonUBPDF(x, gamma,delta,lambda,xi): returns Johnson unbounded (UB) PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = JohnsonUBStat(gamma ,delta, lambda, xi): returns Johnson un-bounded (UB) PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Kron(vec1, vec2): returns the Kronecker product between Vec1 and Vec2. k = Kurtosis(x): computes the fourth moment from the data in x. k = Kurtosis(x, mean, stddev): computes the fourth moment from data in x and stddev(x) and mean(x). LQR(x, Q, R): returns the LQR composition. The L is returned as function result and Q and R are stored in to the parameters. LaplaceCDF(x, m, b): returns Laplace CDF at x. LaplaceCDFInv(p, m, b): returns inverse Laplace CDF at p. LaplacePDF(x, m, b): returns Laplace PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = LaplaceStat(m, b): returns Laplace PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Lcm(x,y): Smallest common multiplier Length(x): element count in vector/matrix x Lerch(z, s, a): returns the estimate of the Lerch transcendent function. Ln(x): natural logarithm of 'x' LnGamma(x): natural logarithm of the gamma function ln(G(x)) Log(x): natural logarithm of 'x' Log10(x): decimal logarithm of 'x' Log2(x): logarithm of base 2 LogN(x,n): logarithm of 'x' base of 'n' LogNormalCDF(x, mu, sigma): returns log-normal CDF at x. LogNormalCDFInv(p, mu, sigma): returns inverse log-normal CDF at p. LogNormalPDF(x, mu, sigma): returns log-normal PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = LogNormalStat(mu, sigma): returns Log-Normal PDF statistics in AMean, AVariance, ASkewness, AKurtosis. LogWeibullPDF(x, a, b): returns logarithmic weibull CDF at x. LogWeibullCDFInv(p, a, b): returns inverse logarithmic weibull CDF at p. LogWeibullPDF(x, a, b): returns logarithmic weibull PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = LogWeibullStat(a, b): returns Log-Weibull PDF statistics in AMean, AVariance, ASkewness, AKurtosis. LogarithmicCDF(x, p): returns logarithmic CDF at x. LogarithmicCDFInv(x, p): returns inverse logarithmic CDF at x. LogarithmicPDF(x, p): returns logarithmic PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = LogarithmicStat(p): returns Logarithmic PDF statistics in AMean, AVariance, ASkewness, AKurtosis. LogisticCDF(x, m, b): returns logistic CDF at x. LogisticCDFInv(p, m, b): returns inverse logistic CDF at p. LogisticPDF(x, m, b): returns logistic PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = LogisticStat(m, b): returns Logistic PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Lower(x): converts x to lower case string. LowerTriangle(x): returns the lower triangle of matrix x with main diagonal. LowerTriangle(x, diag): returns the lower triangle of matrix x. If diag = "diag", the diagonal is included. Max(x): largest element in x Max(a,b): maximum of two values 'a' and 'b' MaxwellCDF(x, a): returns Maxwell CDF at x. MaxwellCDFInv(p, a): returns inverse Maxwell CDF at p. MaxwellPDF(x, a): returns Maxwell PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = MaxwellStat(a): returns Maxwell PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Mean(x): average value of elements in x MeanCols(x): returns vector with averages of columns. MeanRows(x): returns vector with averages of rows. Median(x): returns median value of data in vector x. Min(x): smallest element in x Min(a,b): minimum of two values 'a' and 'b' MtxIntPower(x, n): returns matrix x raised to integer power of n. MtxPower(x, r): returns matrix x raised to arbitrary power r. MtxSqrt(x, n): returns square root of the matrix. NegBinomCDF(x, R, P): returns negative binomial CDF at x. NegBinomCDFInv(y, R, P): returns negative binomial PDF at y. NegBinomPDF(x, R, P): returns negative binomial PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = NegBinomStat(R, p): returns Negative binomial PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Norm(x): squared norm of complex value Norm1(x): returns the 1-norm of the matrix x. NormC(x): returns C-Norm of data in x. NormFro(x): returns the Frobenius norm of the matrix x. NormInf(x): returns the Infinity norm of the matrix x. NormL1(x): returns L1-Norm of data in x. NormL2(x): returns L2-Norm of data in x. NormalCDF(x, mu, sigma): returns normal CDF at x. NormalCDFInv(p, mu, sigma): returns inverse normal CDF at p. NormalPDF(x, mu, sigma): returns normal PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = NormalStat(Mu, Sigma): returns Normal PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Normalize(a, x, y): returns (a-x)/y Ones(Len): returns a vector of ones Len in size. Ones(r,c): returns a vector or a matrix of ones r x c in size. ParetoCDF(x, a, b): returns pareto CDF at x. ParetoCDFInv(p, a, b): returns inverse pareto CDF at p. ParetoPDF(x, a, b): returns pareto PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = ParetoStat(a, b): returns Pareto PDF statistics in AMean, AVariance, ASkewness, AKurtosis. PoissonCDF(x, lambda): returns poisson CDF at x. PoissonCDF(p, lambda): returns poisson CDF at p. PoissonPDF(x, lambda): returns poisson PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = PoissonStat(Lambda): returns Poisson PDF statistics in AMean, AVariance, ASkewness, AKurtosis. x = PolarToCart(amplt, phase): converts polar coordinate to cartesian coordinate PolyCoeff(Roots): returns polynom coefficients from Roots. PolyEval(Values, Coeff): returns polynom defined with Coeff evaluated at Values. PolyRoots(Coeff): returns polynom roots from coefficients in Coeff. Pos(SubStr, Str): returns -1 if substring is not found and otherwise 0-based index position. Pos(SubStr, Str, Offset): returns -1 if substring is not found and otherwise 0-based index position. The search starts at offset. Pow(x,n): x^n Power(x,n): x^n PowerCDF(x, alpha, beta): returns power CDF at x. PowerCDFInv(p, alpha, beta): returns inverse power CDF at p. PowerPDF(x, alpha, beta): returns power PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = PowerStat(alpha, beta): returns Power PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Primes(n): returns n prime numbers up to value 1000. The values are fetched from a table. Product(x): product of elements in x Pythag(x,y): sqrt(x^2 + y^2) RadToDeg(x): converts 'x' radian to degrees Ramp(samples,offset,step): creates vector with a ramp with length samples, which starts at offset and rises with step RandG(): random value with Gaussian distribution with standard params - Mean = 0, StdDev = 1 Random(): random values from range -1..1 RandomG(): random value with Gaussian distribution with standard params - Mean = 0, StdDev = 1 RayleighCDF(x, b): returns Rayleigh CDF at x. RayleighCDFInv(p, b): returns inverse Rayleigh CDF at p. RayleighPDF(x, b): returns Rayleigh PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = RayleighStat(b): returns Rayleigh PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Real(x): real part of complex value Rem(x, y): reminder after division 'x/y' (qoutient, reminder) = RemDiv(x, y): returns qoutient and reminder of integer division 'x/y' ReplaceStr(x, AFromText, AToText): case sensitive replaces FromText to ToText within x. ReplaceText(x, AFromText, AToText): case insensitive replaces FromText to ToText within x. Reverse(x): reverses indexes in vector x RiemannZeta(z): returns the riemann zeta function with 64 approximation terms. RiemannZeta(z,n): returns the riemann zeta function with n user defined approximation terms. Rms(x): root mean square of elements in x Rotate(x,offset): rotates the data in x by offset left or right Rotate90(x): returns the matrix x rotated by 90 degrees clockwise. Round(x): rounds 'x' value to the nearest whole number and returns double RoundToInt(x): rounds 'x' value to the nearest whole number and returns integer Rows(x): row count of matrix x SVD(x): returns singular values of matrix x. SVD(x, u, v): returns singular values of matrix x and U and V values in parameters.. SVDSolve(a,b,s): returns the svd solution of a linear system AX = B. Singular values are returned in s. Function returns solution x. SVDSolve(a,b,s, tol): returns the svd solution of a linear system AX = B. Singular values are returned in s. Rejection tolerance is specified with tol. Function returns solution x. SampleToStr(x): converts x from double to string. Sec(x): secant of 'x' Sech(x): hyperbolic secant of 'x' Sgn(x): {x > 0: 1, x < 0: -1, x = 0: 0} Sin(x): sine of 'x' (aSin, aCos) = SinCos(x): computes sin(x) and cos(x) Sinh(x): hyperbolic sine of 'x' (aSinh, aCosh) = SinhCosh(x): computes sin(x) and cos(x) s = Skewness(x): computes the third moment from the data in x. s = Skewness(x, mean, stddev): computes the third moment from the data in x, where mean and stddev were already computed before. SortAscend(x): sorts values in vector x or values in rows of matrix x. SortAscend(x,col): sorts rows in matrix x. The Col parameter defines the column based on which the rows are compared with each other. SortDescend(x): sorts values in vector x or values in rows of matrix x. SortDescend(x,Col): sorts rows in matrix x. The Col parameter defines the column based on which the rows are compared with each other. Sqr(x): x*x Sqrt(x): square root of 'x' StdDev(x): standard deviation of elements in x stddevcols(x): returns the stddev of columns of matrix x. stddevrows(x): returns the stddev of rows of matrix x. StudentCDF(x, Nu): returns student CDF at x. StudentCDFInv(p, Nu): returns inverse student CDF at p. StudentPDF(x, Nu): returns student PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = StudentStat(Nu): returns Student PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Sum(x): sum of elements in x SumCols(x): returns the sum of columns of matrix x. SumOfSqr(x): returns sum of squares of x. SumRows(x): returns the sum of rows of matrix x. Tan(x): tangens of 'x' Tanh(x): hyperbolic tangens of 'x' ThreshBottom(x, Bottom): returns Bottom, if x < Bottom. Bottom must be a scalar. ThreshTop(x, Top): returns Top, if x > Top. Top must be a scalar. Toeplitz(firstRow): returns toeplitz matrix with first row vector specified as parameter. Trace(x): returns sum of diagonal elements of matrix x. TriangularCDF(x, a,b,c): returns triangular CDF at x. TriangularCDFInv(p, a,b,c): returns inverse of triangular CDF at p. TriangularPDF(x, a,b,c): returns triangular PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = TriangularStat(a,b,c): returns Triangular PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Trim(x): removes trailing and leading spaces. Trunc(x): truncates 'x' value towards zero and returns double TruncToInt(x): truncats 'x' value towards zero and returns integer undefine(x,...): releases memory and type of variables specified as params UniformCDF(x, a, b): returns uniform CDF at x. UniformCDFInv(p, a, b): returns inverse uniform CDF at p. UniformDCDF(x, N): returns discrete uniform CDF at x. UniformDCDFInv(x, N): returns inverse discrete uniform CDF at p. UniformDPDF(x, N): returns discrete uniform PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = UniformDStat(N): returns Uniform Discrete PDF statistics in AMean, AVariance, ASkewness, AKurtosis. UniformPDF(x, a, b): returns uniform PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = UniformStat(a, b): returns Uniform PDF statistics in AMean, AVariance, ASkewness, AKurtosis. Upper(x): converts x to upper case string. UpperTriangle(x): returns the upper triangle of matrix x with main diagonal. UpperTriangle(x, diag): returns the upper triangle of matrix x. If diag = "diag", the diagonal is included. WeibullCDF(x, a,b): returns inverse Weibull CDF at x. WeibullCDFInv(p, a, b): returns inverse Weibull CDF at p. WeibullPDF(x, a,b): returns inverse Weibull PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = WeibullStat(a, b): returns Weibull PDF statistics in AMean, AVariance, ASkewness, AKurtosis. ZScore(x): returns zscore of diagonal elements of matrix x. Zeros(Len): returns a vector of zeros Len in size. Zeros(r,c): returns a vector or a matrix of zeros r x c in size. ZipfCDF(x, s, N): returns zipf CDF at x. ZipfCDFInv(p, s, N): returns inverse zipf CDF at p. ZipfPDF(x, s, N): returns zipf PDF at x. (AMean, AVariance, ASkewness, AKurtosis) = ZipfStat(s, N): returns Zipf PDF statistics in AMean, AVariance, ASkewness, AKurtosis. abs(x): absolute value of 'x' arccos(x): inverse cosine of 'x' arccosh(x): inverse hyperbolic cosine of 'x' arccot(x): inverse cotangens of 'x' arccoth(x): inverse hyperbolic cotangens of 'x' arccsc(x): inverse cosecant of 'x' arccsch(x): inverse hyperbolic cosecant of 'x' arcsec(x): inverse secant of 'x' arcsech(x): inverse hyperbolic secant of 'x' arcsin(x): inverse sine of 'x' arcsinh(x): inverse hyperbolic sine of 'x' arctan(x): inverse tangens arctan(x,y): tangens defined as 'x'/'y' arctanh(x): inverse hyperbolic tangens of 'x' arg(x): atan2(x.Im, x.Re) assign(Dst, Range, Src): assign Src to Dst(Range) assign(Dst, Range1, Range2, Src): assign Src to Dst(Range1, Range2) autocorrbiased(x, Lag): returns auto-correlation of x. autocorrnormal(x, Lag): returns auto-correlation of x. autocorrunbiased(x, Lag): returns auto-correlation of x. boolean(x): converts integer 'x' value to boolean "true" if value is bigger than zero and "false" otherwise. (amplt, phase) = carttopolar(x): converts cartesian coordinate to polar coordinate cbrt(x): computes the cube root 1/x^3 from the data in x. ceil(x): the smallest integer greater than or equal to 'x' cholesky(x): returns true, if matrix is symmetric and positive definite. cis(x): SinCos of 'x' (cos(x)+sin(x)*I) colconcat(src1, src2, ...): concatenate all parameters in to one vector row or matrix provided that sizes are matching cols(x): column count of matrix x comparestr(a, b): returns 0 if both strings match with case sensitivity. comparetext(a, b): returns 0 if both strings match with case insensitivity. conj(x): conjunction of 'x' value convolve(Data, Filter): returns convolution of Data with Filter. cos(x): cosine of 'x' cosh(x): hyperbolic cosine of 'x' cot(x): cotangens of 'x' coth(x): hyperbolic cotangens of 'x' cplx(x): convert x to complex cplx(re,im): make complex value (re+im*I) cplxtostr(x): converts x from complex to string. crosscorr(a, b, HiLag, LoLag, Norm): returns cross correlation between a and b. Norm 0 is default, 1 is biased and 2 is unbiased. csc(x): cosecant of 'x' csch(x): hyperbolic cosecant of 'x' a = csvRead("C:\Work\File.txt"): returns matrix read from the comma delimited text file. a = csvRead("C:\Work\File.txt", "integer"): returns integer, boolean or double/complex matrix read from the text file delimited with commas. a = csvRead("C:\Work\File.txt", "integer", Delimiter): returns integer, boolean or double/complex matrix read from the text file delimited with the Delimiter char. csvWrite("C:\Work\File.txt", a): writes variable a, which must be vector or matrix, to comma delimited text file. csvWrite("C:\Work\File.txt", a, Delimiter): writes variable a, which must be vector or matrix, to comma delimited text file. a = csvread("C:\Work\File.txt"): returns matrix read from the comma delimited text file. a = csvread("C:\Work\File.txt", "integer"): returns integer, boolean or double/complex matrix read from the text file delimited with commas. a = csvread("C:\Work\File.txt", "integer", Delimiter): returns integer, boolean or double/complex matrix read from the text file delimited with the Delimiter char. csvwrite("C:\Work\File.txt", a): writes variable a, which must be vector or matrix, to text file delimited with Delimiter. csvwrite("C:\Work\File.txt", a, Delimiter): writes variable a, which must be vector or matrix, to text file delimited with Delimiter. cumsum(x): returns cumulative sum of data in vector x = [1,2,..] => y = [1,1+2,1+2+3,..] or columns in the matrix. dct(x): returns discrete cosine transform of x (qoutiend, reminder) = deconv(b, a), returns the quotiend of b/a and reminder in the parameter. degtorad(x): converts 'x' degrees to radian determinant(x): returns the determinant of the matrix. diag(x, k): returns the diagonal of matrix x. The k parameter defines the offset from the main diagonal. difference(x, lag): returns vector of differences between elements lag a part. directorycreate("C:\Work\File.txt"): returns True, if the directory was created. directorydelete("C:\Work\File.txt"): returns True, if the directory was deleted. directoryexists("C:\Work\File.txt"): returns True, if the directory exists. dotprod(a,b): returns dot product between vectors a and b. dotprod(a, b, conj): returns dot product between complex vectors a and b and optionally conjugates b, if conj is True. double(x): converts integer 'x' value to double eig(x): returns eigevalues (d) of x eig(x, l, r): returns eigevalues (d) and stores left eigenvectors in l and right eigenvectors in r. endfor(i, range): syntax flow control keyword. Increases i by Step. Returns 'true', if '(i + Range.Step) <= Range.Stop' erf(x): computes the error function from the data in x. erfc(x): computes completementary error function from the data in x. erfinv(x): computes inverse of the error function from the data in x. exp(x): e^ exp10(x): 10^x exp2(x): 2^x expj(x): SinCos of 'x' (cos(x)+sin(x)*I) eye(r): returns square matrix size r x r of zeros with ones on the main diagonal. eye(r,c): returns non-square matrix size r x c of zeros with ones on the main diagonal. fft(x): returns 1D FFT of vector or of rows of matrices. fft2d(x): returns 2D FFT of matrix x. fileclose(aHandle): returns aHandle for the file in the path in parameter. To close the file call fileclose. filecopy("Src.dat", "Dst.dat"): returns True, if the file was copied. filedelete("C:\Work\File.txt"): returns True, if file was deleted. fileexists("C:\Work\File.txt"): returns True, if the file exists. filemove("Src.dat", "Dst.dat"): returns True, if the file was moved. (aHandle) = fileopen("C:\Work\File.dat"): returns aHandle for the file in the path in parameter. To close the file call FileClose. Pos = fileposition(aHandle): returns the position Pos within the file designated with aHandle. Use OpenFile to obtain a file handle. a = fileread(aHandle, "double"): reads a single double value from files current position with aHandle and stores it in a. Use OpenFile to obtain a file handle and CloseFile to close it. a = fileread(aHandle, "double", Count): reads Count double value from files current position with aHandle and stores it in to vector a. Use OpenFile to obtain a file handle and CloseFile to close it. filesetposition(aHandle, Pos): seek to position Pos within the file designated with aHandle. Use OpenFile to obtain a file handle. size = filesize(aHandle): returns the Size of the file designated with aHandle. Use OpenFile to obtain a file handle. filewrite(aHandle, a): write contents of variable a to file designated with aHandle. Use OpenFile to obtain a file handle. fixangle(x): moves big number in to interval [-Pi...Pi] to improve accuracy of angular functions like sin and cos. flip(x): swaps real and image parts of complex value fliphor(x): returns the matrix x flipped horizontally. flipver(x): returns the matrix x flipped vertically. floor(x): the biggest integer less than or equal to 'x' for(i, range): syntax flow control keyword initializes i to Range.Start formatcplx(x, reFormat, imFormat): converts x from string according to format. Examples of good format values: " 0.###;-0.###", "+0.###i;-0.###i" formatsample(x, format): converts x from string according to format. frac(x): returns fractional part of a real number. gamma(x): gamma function G(x) gcd(x,y): greatest common divisor hankel(firstColumn): returns hankel matrix with first column vector specified as parameter. hilbert(x): returns the hilbert transform of vector x or rows in matrix x. idct(x): returns inverse discrete cosine transform of x if(expression): syntax flow control keyword. Returns "true", if "expression" is TRUE (not zero), otherwise returns "FALSE" ifft(x): returns 1D Inverse FFT of vector or of rows of matrices. ifft2d(x): returns 2D Inverse FFT of matrix x. ifft2dtoreal(x): returns 2D Inverse real FFT of matrix x. ifftoreal(x): returns 1D Inverse real FFT of vector or rows of matrices. ifthen(a,b,c): returns 'b', if 'a' is TRUE (not zero), otherwise returns 'c' imag(x): image part of complex value integer(x): truncats 'x' value towards zero and returns integer integrate(x): Integrate all elements in x once. integrate(x, init): Integrate all elements in x using initial values in Init vector Length(Init) times. intpow(x,n): x^n intpower(x,n): x^n inttostr(x): converts x from integer to string. iscomplex(x): returns 1 if x is complex and 0 otherwise isinf(x): TRUE if 'x' is INF isinfnan(x): TRUE if 'x' is NAN or INF isnan(x): TRUE if 'x' is NAN isnaninf(x): TRUE if 'x' is NAN or INF kac(n): returns the Clement matrix of size (n + 1) x (n + 1). kron(vec1, vec2): returns the Kronecker product between Vec1 and Vec2. kurtosis(x): computes the fourth moment from the data in x. kurtosis(x, mean, stddev): computes the fourth moment from data in x and stddev(x) and mean(x). lcm(x,y): Smallest common multiplier length(x): element count in vector/matrix x ln(x): natural logarithm of 'x' lngamma(x): natural logarithm of the gamma function ln(G(x)) log(x): natural logarithm of 'x' log10(x): decimal logarithm of 'x' log2(x): logarithm of base 2 logN(x,n): logarithm of 'x' base of 'n' lower(x): converts x to lower case string. lowertriangle(x): returns the lower triangle of matrix x with main diagonal. lowertriangle(x, diag): returns the lower triangle of matrix x. If diag = "diag", the diagonal is included. lqr(x, Q, R): returns the LQR composition. The L is returned as function result and Q and R are stored in to the parameters. max(x): largest element in x max(a,b): maximum of two values 'a' and 'b' mean(x): average value of elements in x meancols(x): returns vector with averages of columns. meanrows(x): returns vector with averages of rows. median(x): returns median value of data in vector x. min(x): smallest element in x min(a,b): minimum of two values 'a' and 'b' mtxintpower(x, n): returns matrix x raised to integer power of n. mtxpower(x, r): returns matrix x raised to arbitrary power r. mtxsqrt(x, n): returns square root of the matrix. norm(x): squared norm of complex value norm1(x): returns the 1-norm of the matrix x. normalize(a, x, y): returns (a-x)/y normc(x): returns C-Norm of data in x. normfro(x): returns the Frobenius norm of the matrix x. norminf(x): returns the Infinity norm of the matrix x. norml1(x): returns L1-Norm of data in x. norml2(x): returns L2-Norm of data in x. ones(Len): returns a vector of ones Len in size. ones(r,c): returns a vector or a matrix of ones r x c in size. pascl(n): returns the pascal matrix of size n x n. x = polartocart(amplt, phase): converts polar coordinate to cartesian coordinate polycoeff(Roots): returns polynom coefficients from Roots. polyeval(Values, Coeff): returns polynom defined with Coeff evaluated at Values. polyroots(Coeff): returns polynom roots from coefficients in Coeff. pos(SubStr, Str): returns -1 if substring is not found and otherwise 0-based index position. pos(SubStr, Str, Offset): returns -1 if substring is not found and otherwise 0-based index position. The search starts at offset. pow(x,n): x^n power(x,n): x^n primes(n): returns n prime numbers up to value 1000. The values are fetched from a table. product(x): product of elements in x pythag(x,y): sqrt(x^2 + y^2) radtodeg(x): converts 'x' radian to degrees ramp(samples,offset,step): creates vector with a ramp with length samples, which starts at offset and rises with step randg(): random value with Gaussian distribution with standard params - Mean = 0, StdDev = 1 random(): random values from range -1..1 randomg(): random value with Gaussian distribution with standard params - Mean = 0, StdDev = 1 real(x): real part of complex value rem(x, y): reminder after division 'x/y' (qoutient, reminder) = remdiv(x, y): returns qoutient and reminder of integer division 'x/y' replacestr(x, AFromText, AToText): case sensitive replaces FromText to ToText within x. replacetext(x, AFromText, AToText): case insensitive replaces FromText to ToText within x. reverse(x): reverses indexes in vector x rms(x): root mean square of elements in x root(x,k,n): 'n' roots of 'x' by varying 'k' from [0..n-1] rotate(x,offset): rotates the data in x by offset left or right rotate90(x): returns the matrix x rotated by 90 degrees clockwise. round(x): rounds 'x' value to the nearest whole number and returns double roundtoint(x): rounds 'x' value to the nearest whole number and returns integer rowconcat(src1, src2, ...): concatenate all parameters in to one vector column or matrix provided that sizes are matching rows(x): row count of matrix x sampletostr(x): converts x from double to string. sec(x): secant of 'x' sech(x): hyperbolic secant of 'x' select(vector, range): returns a view of vector from [Index1,...,Index2] select(matrix, range1,range2): returns a copy of submatrix defined with upper left and lower right edge. select(matrix, range1,range2, param): returns a copy of submatrix defined with upper left and lower right edge. The param defines the destination type: "integer","double","complex","boolean","string". sgn(x): {x > 0: 1, x < 0: -1, x = 0: 0} sin(x): sine of 'x' (aSin, aCos) = sincos(x): computes sin(x) and cos(x) sinh(x): hyperbolic sine of 'x' (aSinh, aCosh) = sinhcosh(x): computes sin(x) and cos(x) s = skewness(x): computes the third moment from the data in x. s = skewness(x, mean, stddev): computes the third moment from the data in x, where mean and stddev were already computed before. sortascend(x): sorts values in vector x or values in rows of matrix x. sortascend(x,col): sorts rows in matrix x. The Col parameter defines the column based on which the rows are compared with each other. sortdescend(x): sorts values in vector x or values in rows of matrix x. sortdescend(x,Col): sorts rows in matrix x. The Col parameter defines the column based on which the rows are compared with each other. sqr(x): x*x sqrt(x): square root of 'x' stddev(x): standard deviation of elements in x stddevcols(x): returns the stddev of columns of matrix x. stddevrows(x): returns the stddev of rows of matrix x. sum(x): sum of elements in x sumcols(x): returns the sum of columns of matrix x. sumofsqr(x): returns sum of squares of x. sumrows(x): returns the sum of rows of matrix x. svd(x): returns singular values of matrix x. svd(x, u, v): returns singular values of matrix x and U and V values in parameters.. svdsolve(a,b,s): returns the svd solution of a linear system AX = B. Singular values are returned in s. Function returns solution x. svdsolve(a,b,s, tol): returns the svd solution of a linear system AX = B. Singular values are returned in s. Rejection tolerance is specified with tol. Function returns solution x. tan(x): tangens of 'x' tanh(x): hyperbolic tangens of 'x' threshbottom(x, Bottom): returns Bottom, if x < Bottom. Bottom must be a scalar. threshtop(x, Top): returns Top, if x > Top. Top must be a scalar. toeplitz(firstRow): returns toeplitz matrix with first row vector specified as parameter. trace(x): returns sum of diagonal elements of matrix x. trim(x): removes trailing and leading spaces. trunc(x): truncates 'x' value towards zero and returns double trunctoint(x): truncats 'x' value towards zero and returns integer undefine(x,...): releases memory and type of variables specified as params upper(x): converts x to upper case string. uppertriangle(x): returns the upper triangle of matrix x with main diagonal. uppertriangle(x, diag): returns the upper triangle of matrix x. If diag = "diag", the diagonal is included. vandermonde(cols, x): returns the vandermonde matrix of length(x) x cols while(expression): syntax flow control keyword. Returns 'true', if 'expression' is TRUE, otherwise returns 'FALSE' zeros(Len): returns a vector of zeros Len in size. zeros(r,c): returns a vector or a matrix of zeros r x c in size. zscore(x): returns zscore of diagonal elements of matrix x. Operator listing: !x :Logical "not" operator when applied to booleans and bitwise "not" when applied to integers. x != y: not equal to operator x % y: Remainder operator applicable to integers and real numbers x & y: logical (when applied to booleans) and bitwise (when applied to integers) 'and' operator x': unary transpose (adjungate) vector/matrix operator. x * y: Matrix multiplication with matching dimensions. x *. y or x .* y: Multiplication by element ignoring dimensions except for Length. x + y: Add with matching dimensions. x +. y or x .+ y: Add elements ignoring dimension except for Length. +x :plus operator. x - y: Subtract with matching dimensions. x -. y or x .- y: Subtract elements ignoring dimension except for Length. -x :minus operator. y / x: Matrix division operator. Integer division returns real number. Solving A = y*x^(-1), x /. y or x ./ y: Division by element ignoring dimensions except for Length. Integer division returns integer. x:y or x:step:y :Range operator can be with integers or real numbers. X represents start and y is the final value. If the step is not specified it is assumed to be 1. Step can be positive or negative. x < y: less than operator x << y :Bit shift integer x by y bits left. x <= y: less than or equal to operator x <> y: not equal to operator x = y: assignment operator x == y: equal to operator x > y: greater than operator x >= y: greater than or equal to operator x >> y :Bit shift integer x by y bits right. Not x :Logical "not" operator when applied to booleans and bitwise "not" when applied to integers. x \ y: Back division operator for matrix operations x = A^(-1)*y is written as x = A\y when A is matrix and y is matrix or vector. Coming from equation Ax = y, where "x" is the solution of the linear system. x ^ y: Power operator. x and y: logical (when applied to booleans) and bitwise (when applied to integers) 'and' operator x div y: Strictly integer division only operator. x mod y: Remainder operator applicable to integers and real numbers not x :Logical "not" operator when applied to booleans and bitwise "not" when applied to integers. x or y: logical (when applied to booleans) and bitwise (when applied to integers) 'or' operator x shl y :Bit shift integer x by y bits left. x shr y :Bit shift integer x by y bits right. x xor y: logical (when applied to booleans) and bitwise (when applied to integers) 'xor' operator x | y: logical (when applied to booleans) and bitwise (when applied to integers) 'or' operator ~x :Logical "not" operator when applied to booleans and bitwise "not" when applied to integers. x ~= y: not equal to operator