# Built In Functions

Modified: 2013/05/11 16:59 by TheWizEd - Categorized as: English
 Name Description abs(number) Absolute value acos(number) Inverse cosine acosh(number) Inverse hyperbolic cosine acot(number) Inverse cotangent acoth(number) Inverse hyperbolic cotangent acsc(number) Inverse cosecent ainterp(x-vector, y-vector, number) Akima-spline interpolated value at number for data vector x-vector and y-vector of the same size (Vector is a column matrix) alg(matrix, number, number) Cofactor (algebraic signed minor) of matrix arg(number) Angle from the real axis to the given complex number asec(number) Inverse secent asin(number) Inverse sine asinh(number) Inverse hyperbolic sine atan(number) Inverse tangent atanh(number) Inverse hyperbolic tangent augment(…) Returns a matrix formed by placing arguments left to right. Arguments are matrices or column vectors having the same number of rows, or they are scalars and row vectors. break Terminates the execution of the nearest enclosing loop in which it appears. Control passes to the statement that follows the terminated statement, if any. cinterp(x-vector, y-vector, number) Returns a cubic spline interpolated value at number for data vectors x-vector and y-vector of the same size (Vector is a column matrix) col(matrix, number) Returns the specified column of the matrix/vector cols(matrix) Returns the number of columns of the matrix/vector concat(…) Concatenating strings continue Ends the current iteration of a loop cos(number) Cosine cosh(number) Hyperbolic cosine cot(number) Cotangent coth(number) Hyperbolic cotangent csc(number) Cosecantc csch(number) Hyperbolic cosecant csort(matrix/vector, number) Returns a matrix/vector formed by rearranging rows until specified column is in ascending order description("name") Returns Description text of the definition “name” using current language det(matrix) Matrix determinate dfile(filename) Remove file from file system diag(vector) Returns a square matrix containing on its diagonal the elements of vector (Vector is a column matrix) diff(2)(expression, variable) Differentiate (dx/dy) diff(3)(expression, variable) Differentiate (d2x/dy2) el(matrix, vector) Returns the specified element of the vector el(matrix, number, number) Return the element of the matrix mij error(string) Shows standard SMath Studio error tip with text form the function argument eval(expression) Converts the given expression from symbolic to numeric notation exp(number) Exponential function e raised to the power number findrows(matrix, expression, number) Retrieves all rows of matrix where expression is specified in column number. Returns 0 if no matches found. findstr(string, string) Returns vector of start position of second string insider first string. Returns -1 if no match found for(3)(increment, vector, body) For loop for(4)(increment, condition, action, body) For loop Gamma(number) Gamma function calculation grads(number) Evaluate in Grads identity(number) Returns an nxn identity matrix. n must be a positive integer if(condition, true, false) Returns the "true statement" if logical "condition statement" is true (non-zero). "false statement" otherwise. Im(number) Imaginary part of complex number importData(filename) Returns a matrix of loaded data from specified file using default parsing parameters importData(filename, decimalSymbol, argumentsSeparator, columnsDelimiter, fromRow, toRow, fromColumn, toColumn, isSymbolic) Returns a matrix of loaded data from specified file. Function can be used with 1-9 of the arguments specified. Digit 0 (zero) can be used for the arguments (except filename) to get the built in default values. int(express, number, number, variable) Definite integral invert(matrix/number) Inverted value IsDefined("expression") Returns 1 if all variables and functions in the expression is defined, 0 - otherwise. (*) IsString(argument) Returns 1 if specified argument is a string. 0 otherwise Jacob(vector,vector) Returns the Jacobian matrix of the vector function (*) length(matrix/vector) The number of elements in matrix or vector. Returns a scalar line(…) Draws a line for a subroutine linterp(x-vector, y-vector, number) Returns a linearly interpolated value at number for data vectors x-vector and y-vector of the same size. (Vector is a column matrix) ln(number) Natural logarithm log(number, number) Logarithm of number to the specified base (second number) log10(number) Base 10 logarithm of number mat(…) Matrix matrix(rows, cols) Returns a matrix of size specified filled with zeros max(matrix/vector) Returns the largest element of matrix/vector. If any value is complex returns max(Re(…))+i*max(Im(…)) min(matrix/vector) Returns the smallest element of matrix/vector. If any value is complex returns min(Re(…))+i*min(Im(…)) minor(matrix, number, number) Minor of matrix mod(number, number) Returns the remainder on dividing the first argument by the second. Arguments must be real norm1(matrix) Returns the L1 norm of the matrix norme(matrix) Returns the Euclidean norm of the matrix normi(matrix) Returns the infinite norm of the matrix nthroot(number, number) Root num2str(expression) Converts specified math expression to a string numden(expression) Returns a 2 element vector of numerator and denominator values of expression perc(number, percent) Percentage pol2xy(number, number) Converts the polar coordinates of a point in 2D space to rectangular coordinates polyroots(vector) Returns all the roots of the polynomial whose coefficients are in argument vector product(expression, number, number, variable) Iterated product random(number) The random number from 0 to the arguments value range(2)(number, number) Returns a vector of values within the specified range with step equal to 1 range(3)(number, number, step) Returns a vector of values within the specified range with step equal to step rank(matrix) Matrix rank Re(number) Returns the real part of complex number reverse(matrix/vector) Reverses the order of rows of matrix or of element in a vector rfile(filename) Read math expression from file roots(vector1,vector2) Finds roots for system of nonlinear equations. Returns the values of vector2 to make the set of functions vector1 equal to zeros. (*) roots(vector1,vector2,vector3) Finds roots for system of nonlinear equations according to specified approaches vector3. Returns the value of vector2 to make the set of functions vector1 equal to zeros. (*) round(number, number) Rounds the real number x to n places row(matrix/vector, number) Returns the row of the matrix/vector rows(matrix/vector) Number of rows of the matrix/vector rsort(matrix/vector, number) Returns a matrix formed by rearranging columns until specified row is in ascending order sec(number) Secant sech(number) Hyperbolic secant sign(number) Returns 0 if x=0, 1 if x>0, and -1 otherwise. Argument must be a real number sin(number) Sine sinh(number) Hyperbolic sine solve(2)(expression, variable) Returns real roots of expression with respect to variable solve(4)(expression, variable, lower, upper) Returns real roots of expression with respect to variable in the interval between lower and upper sort(vector) Returns a vector with the values sorted in ascending order sqrt(number) Square root stack(…) Returns a matrix formed by placing arguments top to bottom. Arguments are matrices or column vectors having the same number of columns, or they are scalars and column vectors. str2num(string) Returns math expression formed by converting from specified string strlen(string) Returns the number of characters in specified string strrep(originalString, oldString, newString) Replaces all occurrences of oldString within originalString with newString submatrix(matrix, i_row, j_row, i_col,j_col) Returns the submatrix consisting of elements in rows i_row through j_row and columns i_col through j_col substr(string, number) Returns a substring of string. Where number is a starting character position of substring. substr(string, number1, number2) Returns a substring of string. Where number1 is a starting character position of substring; number2 is a length of result string. sum(matrix) Summation of the vector/matrix elements sum(expression, number, number, variable) Summation of an expression “matrix” in summation variable “increment” with lower limit “number1” and upper limit “number2” sys(…) Multiple values tan(number) Tangent tanh(number) Hyperbolic tangent tr(matrix) Matrix trace. Sum of the element on the main diagonal (the diagonal from the upper left to the lower right) of a square matrix trace(…) Returns a string containing the value of the arguments with output order and surrounding text specified by first argument. Output values in the Output Window. Specifying the first text argument is optional. transpose(matrix/vector) Matrix transpose trunc(number) The integer part of a real number by removing the fractional part vminor(matrix,number, number) Returns submatrix of matrix excepting the specified row and column wfile(expression,filename) Write math expression to file. If file with filename existing function will overwrite it. Will return 1 if successful, 0 otherwise while(condition,body) Function of iterations. The cycle carries out a body while the condition is true. Important: in a body any quantity of expressions by means of function line(…) can be set. xy2pol(number,number) Converts the rectangular coordinates of a point in 2D space to polar coordinates.

ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.