List of Functions
Functions currently documented and others coming soon
This page lists all of the functions in the LAMBDA Library. Proposed functions for the library may also be found on the candidates page.
Interpolation
- LINTERP(xs,known_xs,known_ys) :: Linearly interpolate between the two nearest points
- PINTERP(xs,known_xs,known_ys,n) :: Polynomial interpolation between the n+1 closest points in the table
- CSPLINE(known_xs,known_ys,[x],[ms],[c]) :: Cubic Hermite Spline interpolation
- NSPLINE(known_xs,known_ys,[x]) :: Natural Cubic Spline interpolation
- SPLINE(known_xs,known_ys,[x],[cond_start],[cond_end]) :: C2 Interpolating Cubic Spline with specified end conditions
Equation Solvers
- QUADRATIC(coeffs) :: Uses the quadratic formula to solve ax^2+bx+c=0
- SOLVE_NR(function,xstart,[y]...) :: The Newton-Raphson method as a LAMBDA function
Sequences, Numbering, Grids
- FIBONACCI(n) :: Return the first N values in the Fibonacci Sequence
- ISUNIFORM(vector,[precision_n]) :: Returns {TRUE;step} if the sequence vector is evenly spaced or {FALSE;MAX(step)-MIN(step)}
- LINSPACE(start,end,n) :: Sequence between start and end with n evenly spaced points
- LOGSPACE(start,end,n) :: 10^LINSPACE. Sequence of evenly spaced points on logarithmic scale
- RESCALE(array,lower,upper) :: Returns the array scaled to [lower,upper]
- MESHGRID(xvec,yvec) :: Create a 2D grid of X-Y coordinates
- SE(start,end) :: Create a sequence of integers or characters between start and end
Arrays (Both Numeric and Text)
- CIRCSHIFT(array,n,[by_col]) :: Shifts the rows (or columns) of an array n times
- COMBINATIONS(array1,array2) :: Returns an array of all combinations of rows within two arrays
- COMBINR(array,r) :: Return all the combinations of size r from an nx1 array
- FLIP(array,[dimension]) :: Reverses the order of the rows or columns of an array
- FLIPLR(array) :: Reverses the order of the columns of an array
- FLIPUD(array) :: Reverses the order of the rows of an array
- REPARRAY(array,m_vert,n_horiz) :: Repeat an array m times vertically and n times horizontally
- REPELEM(array,m_vert,n_horiz) :: Repeat the elements of an array m times vertically and n times horizontally.
- REPLACEBLOCK(array,i,j,new_block) :: Replace a block within an array by specifying the starting (i,j) location
- ROT90(array,[n]) :: Rotates the array 90 degrees counterclockwise (not identical to transpose)
- SLICE(array,row_start,row_end,col_start,col_end) :: Return a subset of an array by specifying row and column start and end indices
- SPLICE(array,start_index,delete_count,insert_array,by_col) :: Splice an array to delete or insert rows or columns
Matrix Functions
- ONES(m_rows,[n_columns]) :: Create an array or vector of ones, based on size of array or dimensions m,n
- ZEROS(m_rows,[n_columns]) :: Create an array or vector of zeros, based on size of array or dimensions m,n
- ROWSUM(matrix) :: Returns a column containing the sum of each row
- COLSUM(matrix) :: Returns a row containing the sum of each column
- CHOLESKY(A) :: Cholesky decomposition of a symmetric positive-definite matrix
- CROSS(vec_a,vec_b) :: Returns the Cross Product of vectors a and b
- DIAG(vector_or_matrix) :: Convert a vector to a Diagonal matrix or vice versa
- DOT(vec_a,vec_b) :: Returns the Dot Product of vectors a and b
- EIGENVALUE(matrix) :: Find the real eigenvalues of a matrix using the QR algorithm
- HESS(A) :: Returns the Hessenberg of a square matrix using the Householder transformation
- MAGNITUDE(a) :: Returns the magnitude of a vector or the magnitude of individual columns of a matrix
- PASCAL(n) :: Returns a Pascal matrix of size nxn
- QR(A) :: Returns the QR Decomposition of A using the Householder transformation process.
Polynomials
- POLYFIT(known_xs,known_ys,n) :: Returns the coefficients for the nth-degree polynomial fit using LINEST
- POLYVAL(coeffs,x) :: Evalutes the nth-degree polynomial p(x) at each value of x, using coefficients from POLYFIT.
- POLYDER(coeffs) :: Returns the derivative of the polynomial defined by coefficients in descending order of power.
- POLYINT(coeffs,[k],[a],[b]) :: Returns the integral of the polynomial with integration constant k, optionally evaluated from a to b
- POLYADD(a,b) and POLYSUB(a,b) :: Add or subtract two polynomials
- POLYMULT(a,b) :: Returns the coefficients of the polynomial found by multiplying polynomials a and b.
- POLYDIV(a,b) :: Polynomial long division, returns the quotient and remainder of a / b.
- POLYCOMPAN(coeffs) :: Returns the companion matrix for a polynomial defined by coeffs
- POLYROOTS(coeffs) :: Find all the real and complex roots of a polynomial
- POLYFROMROOTS(roots) :: Create a polynomial from a vector of roots
- PPVAL(pp_array,xvec) :: Evaluate a Piecewise Polynomial at each value of x
- PPINT(pp_array,[a],[b],[cumulative]) :: Definite Integral of a Piecewise Polynomial from a to b
- PPDER(pp_array) :: Derivative of a Piecewise Polynomial
Calculus (Finite Differences and Integration)
- DIFF(x) :: Calculate the difference between adjacent values of a column vector
- FDIFF(x,h,n) :: Calculates n-th Finite Difference Derivatives assuming uniform spacing
- PDIFF(x,y,n,order) :: Polynomial-based Finite Difference Derivatives for uneven spacing
- TRAPZ(y,[x],[dx]) :: Numerical Integration using the Trapezoidal Rule
- SIMPSON(y,[x],[dx]) :: Numerical Integration using composite Simpson's 1/3 Rule
Text Manipulation
- TEXT2ARRAY(text,[dim]) :: Converts a text string to a row (dim=1, default) or column (dim=2) of characters
- COUNTCHAR(text,char) :: Count the number of instances of char within text. char can be a string.
- REMOVECHARS(text,chars) :: Removes all of the characters in chars (individually) from text.
Complex Numbers
See Topic: Complex Numbers
- IM_ISCOMPLEX(matrix) :: Returns TRUE if a matrix includes at least one complex number
- IM_CTRANSPOSE(matrix) :: Returns the conjugate transpose of a complex matrix
- IM_DOT(a_vec,b_vec) :: Returns the Complex Dot Product of two vectors
- IM_SUMPRODUCT(a_vec,b_vec) :: Returns the sum of the element-wise multiplication of a and b
- IM_MMULT(a_mat,b_mat) :: Returns the matrix multiplication of a and b
- IM_ROUNDTOZERO(inumber,[epsilon]) :: Makes any |coefficient| less than epsilon=1E-14 equal to zero
- IM_ROUND(inumber,num_digits) :: Applies the ROUND function to the coefficients of inumber
- IM_TOARRAY(inumber) :: Converts z=x+yi to an array {x,y}. inumber may be a column vector.
Conversion
- ROMAN2INT(text) :: Converts a Roman numeral like "XLII" to an integer
Other Functions
- SFROUND(value,sig_figs,[round_opt]) :: Round a value to a number of significant figures
- CUMULATIVESUM(array) :: Return a running total of values in an array
- SCURVE(startdates,enddates,values) :: Generate S-Curves for project management task data
- GCD(a,b) :: Finds the Greatest Common Divisor of a and b, using the Euclidean algorithm
- LCM(a,b) :: Finds the Least Common Multiple of a and b, using the Euclidean algorithm
- BOOKMARK(cell) :: Used with HYPERLINK to create a clickable link to another cell
- AD(cell,[abs_num],[a1_r1c1],[include_sheetname]) :: A shortcut version of ADDRESS
Lambda Utilities
- TIMER(n,function) :: Run a function n times and return the time in milliseconds
- BYROW2D(array,function) :: Return a multi-column array instead of just a single column
- BYCOL2D(array,function) :: Return a multi-row array instead of just a single row