【中文版】

Introduction

MFP language introduction

MFP functions

all functions

integer operation

logic functions

statistic and stochastic

trigononmetric functions

exponential functions

complex number

system functions

array or matrix

graphic functions

expression and calculus

string functions

hyperbolic trigononmetric

sorting functions

polynomial

signal processing

file operation

time and date

graphic display

multimedia functions

data structure

data interchange format

platform and hardware

parallel computing

RTC multimedia

reflection

MFP compiling

others

deploy user functions

call MFP in your app

build Android APK

game programming

chart plotting

MFP math analysis

MFP file procession

number string and array

time date and system

Introduction of SCP

Scientific Calculator Plus Help : array or matrix functions

Function name Function info
adj

::mfp::math::matrix::adj(1) :

adj(x), where x is 2D square matrix, returns the adjugate matrix of x.

alloc_array

::mfp::array::alloc_array(1...) :

alloc_array(x...) returns a newly allocated array whose size is determined by parameters. All the parameters must be positive integers.

::mfp::array::alloc_array(2) :

alloc_array(x, y) returns a newly allocated array whose size is determined by parameter x which is a list of integer. Parameter y is the default value of array elements. Note that y is optional, by default all the elements are initialized as zero.

cofactor

::mfp::math::matrix::cofactor(1) :

cofactor(x), where x is 2D square matrix, returns the cofactor matrix of x.

det

::mfp::math::matrix::det(1) :

Function det(x) calculates determinant of square matrix x.

deter

::mfp::math::matrix::deter(1) :

Function deter(x) calculates determinant of square matrix x.

dprod

::mfp::math::matrix::dprod(2) :

Function dprod calculates dot product of two vectors [x1, x2, ... xn] and [y1, y2, ... yn].

eig

::mfp::math::matrix::eig(1) :

eig(A) calculates 2D square matrix A's eigen vectors and eigen values. This function returns a two element list. First element is the eigen vector matrix, each column is an eigen vector. Second element is a diagonal matrix. Each diagonal element is an eigen value. Note that this function needs big memory to run and consumes significant CPU time. If running in mobile device, size of A and B should be no greater than 6*6. If running on PC, A and B should be no greater than 8*8. Otherwise, it may fail because lack of memory or run for very long time.

::mfp::math::matrix::eig(2) :

eig(A, B) calculates 2D square matrix A's eigen vectors and eigen values against same size matrix B, i.e. Av = lambda * Bv, where lambda is an eigen value and v is an eigen vector. The second parameter, B, is optional. By default, B is an I matrix. This function returns a two element list. First element is the eigen vector matrix, each column is an eigen vector. Second element is a diagonal matrix. Each diagonal element is an eigen value. Note that this function needs big memory to run and consumes significant CPU time. If running in mobile device, size of A and B should be no greater than 6*6. If running on PC, A and B should be no greater than 8*8. Otherwise, it may fail because lack of memory or run for very long time.

eye

::mfp::math::matrix::eye(1) :

eye(x), where x is a positive integer, returns 2-D matrix I whose size is x times x. Note that eye(0) returns 1.

::mfp::math::matrix::eye(2) :

eye(x,y), where x and y are both positive integer numbers, returns y-D matrix I whose size of each dimension is x.

get_eigen_values

::mfp::math::matrix::get_eigen_values(1) :

get_eigen_values(A) calculates 2D square matrix A's eigen values. This function returns an eigen value list which includes all the eigen values including duplicated ones. Note that this function needs big memory to run and consumes significant CPU time. If running in mobile device, size of A and B should be no greater than 6*6. If running on PC, A and B should be no greater than 8*8. Otherwise, it may fail because lack of memory or run for very long time.

::mfp::math::matrix::get_eigen_values(2) :

get_eigen_values(A, B) calculates 2D square matrix A's eigen values against same size matrix B, i.e. Av = lambda * Bv, where lambda is an eigen value and v is an eigen vector. The second parameter, B, is optional. By default, B is an I matrix. This function returns an eigen value list which includes all the eigen values including duplicated ones. Note that this function needs big memory to run and consumes significant CPU time. If running in mobile device, size of A and B should be no greater than 6*6. If running on PC, A and B should be no greater than 8*8. Otherwise, it may fail because lack of memory or run for very long time.

get_extreme_elem

::mfp::array::get_extreme_elem(3) :

Function get_extreme_elem analyses input dataArray and returns the maximum or minimum element in the data array. If an element is not a real value, this function ignores it. It has three parameters. The first is data array (it can be a single value), the second is original max or min value. If this is not null and is a real value, the function compares selected max or min element with this parameter and returns the new max or min value. The third one is to tell the function to get max value or min value. 0 is for min value and 1 is for max value. Examples are get_extreme_elem([[2, 3], "hello", 5], null, 1) and get_extreme_elem([[3,4,6],[5+3i, 7, 9.88-4.61], [5.77 -0.03i]], -8, 0).

includes_inf

::mfp::array::includes_inf(1) :

includes_inf(x) determines if x includes positive infinite or negative infinite. Include means, if x is an array, then one of its elements is or includes the destination value(s), if x is a complex value, then its real or image is the destination value(s), if x is a single value, then it is the destination values(s). If it is, return true. Otherwise, return false.

includes_nan

::mfp::array::includes_nan(1) :

includes_nan(x) determines if x includes Nan. Include means, if x is an array, then one of its elements is or includes the destination value(s), if x is a complex value, then its real or image is the destination value(s), if x is a single value, then it is the destination values(s). If it is, return true. Otherwise, return false.

includes_nan_or_inf

::mfp::array::includes_nan_or_inf(1) :

includes_nan_or_inf(x) determines if x includes Nan or positive infinite or negative infinite. Include means, if x is an array, then one of its elements is or includes the destination value(s), if x is a complex value, then its real or image is the destination value(s), if x is a single value, then it is the destination values(s). If it is, return true. Otherwise, return false.

includes_nan_or_inf_or_null

::mfp::array::includes_nan_or_inf_or_null(1) :

includes_nan_or_inf_or_null(x) determines if x includes Nan or positive infinite or negative infinite or null. Include means, if x is an array, then one of its elements is or includes the destination value(s), if x is a complex value, then its real or image is the destination value(s), if x is a single value, then it is the destination values(s). If it is, return true. Otherwise, return false.

includes_null

::mfp::array::includes_null(1) :

includes_null(x) determines if x includes null. Include means, if x is an array, then one of its elements is or includes the destination value(s), if x is a complex value, then its real or image is the destination value(s), if x is a single value, then it is the destination values(s). If it is, return true. Otherwise, return false.

invert

::mfp::math::matrix::invert(1) :

invert(x) inverted 2D matrix x. Note that the elements of x can be complex numbers but x must be a square matrix (i.e. number of rows equals number of columns).

is_eye

::mfp::math::matrix::is_eye(2) :

is_eye(x,y), where x is an array or number and y is a boolean, identifies x is matrix I (or 1) or not. If x is matrix I (or 1), returns true, otherwise, returns false. If y is true, looks on all null values as zero, otherwise, null values are not looked on as zero. Y is optional. By default, it is false.

is_zeros

::mfp::math::matrix::is_zeros(2) :

is_zeros(x,y), where x is an array or number and y is a boolean, identifies x is matrix zeor (or number zero) or not. If x is, returns true, otherwise, returns false. If y is true, looks on all null values as zero, otherwise, null values are not looked on as zero. Y is optional. By default, it is false.

left_recip

::mfp::math::matrix::left_recip(1) :

left_recip(x) calculates left-division reciprocal of x. Note that so far x can only be a number or a 2D matrix.

ones

::mfp::math::matrix::ones(1...) :

Function ones generates a matrix whose elements are all one. The dimension of the matrix is determined by the parameters of ones function, which is either a number of positive integers or a single positive integer list. Note that ones([]) returns 1.

rank

::mfp::math::matrix::rank(1) :

rank(matrix) returns the rank of a matrix. For example rank([[1,2],[2,4]]) returns 1.

recip

::mfp::math::matrix::recip(1) :

recip(x) calculates reciprocal of x. Note that so far x can only be a number or a 2D matrix.

set_array_elem

::mfp::array::set_array_elem(3) :

set_array_elem(x,y,z) sets x[y] to be z, and returns new x. Note that x can be an array or a single element, y must be a list of positive integers which are the indices. Y can be beyond the size of x. For example x = 3, y = [1, 2], z = 2 + 3i then set_array_elem(x,y,z) = [3, [0, 0, 2+3i]]. Also note that after set_array_elem is called, the original x value may or may not change. So please always assign returned value back to x to get updated x value.

size

::mfp::array::size(1) :

size(x) returns a size list of array x. Note that if x is not an array, it always return [].

::mfp::array::size(2) :

size(x,y) returns a size list of array x which includes the first y dimension sizes. If x has less than y dimensions, return full size list. Note that y must be a positive integer. Note that if x is not an array, it always return [].

upper_triangular_matrix

::mfp::math::matrix::upper_triangular_matrix(1) :

upper_triangular_matrix(x) returns the upper triangular matrix of 2D square x after LU decomposition.

zeros

::mfp::math::matrix::zeros(1...) :

Function zeros generates a matrix whose elements are all zero. The dimension of the matrix is determined by the parameters of zeros function, which is either a number of positive integers or a single positive integer list. Note that zeros([]) returns 0.