|
|
Purpose
To calculate an absolute value of a number.
abs(x) = x if x > 0
abs(x) = -x if x < 0
Usage
{double} ret = ABS({double} argm1)
argm1 = a number
Example:
->a = abs(-5.7) ->print a 5.70000 |
See also
round, fix
Purpose
To calculate an inverse cosine function of a number. The return is an angle, in a unit set by command "set angle", ranging from -90 degrees to +90 degrees.
Usage
{double} ret = ACOS({double} argm1)
argm1 = a number between -1 to +1
Example:
->set angle Angle mode = DEG ->a = acos(0) ->print a 90.00000 |
See also
asin, atan, atan2
Purpose
To calculate an inverse hyperbolic cosine function of a number.
Usage
{double} ret = ACOSH({double} argm1)
argm1 = a number
Example:
->a = acosh(2) ->print a 1.31696 |
See also
asinh, atanh
Purpose
To calculate an inverse sine function of a number. The return is an angle, in a unit set by command "set angle", ranging from -90 degrees to +90 degrees.
Usage
{double} ret = ASIN({double} argm1)
argm1 = a number between -1 to +1
Example:
->set angle Angle mode = DEG ->a = asin(1) ->print a 90.00000 |
See also
asin, atan, atan2
Purpose
To calculate an inverse hyperbolic sine function of a number.
Usage
{double} ret = ASINH({double} argm1)
argm1 = a number
Example:
->a = asinh(2) ->print a 1.44364 |
See also
acosh, atanh
Purpose
To calculate an inverse tangent function of a number. The return is an angle, in a unit set by command "set angle", ranging from -90 degrees to +90 degrees.
Usage
{double} ret = ATAN({double} argm1)
argm1 = a number
Example:
->set angle Angle mode = DEG ->a = atan(1) ->print a 45.00000 |
See also
asin, atan, atan2
Purpose
To calculate an inverse tangent function, given 2 arguments. The return is an angle, in a unit set by command "set angle". This function gives a return angle in a range of -180 to +180 degrees.
The 1st argument is for y coordinate, and the 2nd argument is for x coordinate. The sign of y and x coordinates are taken into account. For example if the y coordinate is negative and the x coordinate is also negative, the result angle is in third quadrant.
Usage
{double} ret = ATAN2({double} argm1, {double} argm2)
argm1 = y coordinate
argm2 = x coordinate
Example:
->set angle Angle mode = DEG ->a = atan2(-1,-1) ->print a -135.00000 |
See also
atan
Purpose
To calculate an inverse hyperbolic tangent function of a number.
Usage
{double} ret = ATANH({double} argm1)
argm1 = a number
Example:
->a = atanh(0.5) ->print a 0.54931 |
See also
asinh, acosh
Purpose
To round up to the nearest integer number.
Usage
{double} ret = CEILING({double} argm1)
argm1 = a number
Example:
->a = ceiling(15.1) ->print a 16.00000 ->a = ceiling(-15.1) ->print a -16.00000 |
See also
round, fix
Purpose
To calculate a cosine function of an angle. The angle unit in a unit set by command "set angle".
Usage
{double} ret = COS({double} argm1)
argm1 = a number
Example:
->set angle Angle mode = DEG ->a = cos(90) ->print a 0.00000 |
See also
sin, tan
Purpose
To calculate a hyperbolic cosine function of an angle.
cosh(x) = (exp(x) + exp(-x)) / 2
Usage
{double} ret = COSH({double} argm1)
argm1 = a number
Example:
->a = cosh(2) ->print a 3.76220 |
See also
sinh, tanh
Purpose
To count the number of elements, whose values > 0, in a matrix_bln.
Usage
{int} ret = COUNT({Matrix_bln} argm1)
argm1 = a Matrix_bln in which elements >0 are counted
Example:
->A = [ 1 2 3; 4 5 6; 7 8 9] ->n = count(A>4) (Remark: The expression A>4 return a Matrix_bln object) ->print a 5 |
See also
find
Purpose
To convert to a decimal degree.
Usage
{double} ret = DEG({double} argm1)
argm1 = a number with a DD.MMSSSSS format
ret = DD + MM/60 + SS.SSSS / 3600
Example:
->a = deg(20.5013456) (remark : this is an angle of 20 deg 50 min 13.456 sec) ->print a 20.83707 |
See also
dms
Purpose
To calculate a double factorial function of a number.
Usage
{double} ret = FACT({double} argm1)
argm1 = a number
ret = 1* 3 * 5 *...* argm1 if argm1 is odd
ret = 2* 4 * 6 *...* argm1 if argm1 is even
Example:
->a = fact(4) ->print a 8.00000 |
See also
fact
Purpose
To convert to a decimal degree angle to a degree, minute, second angle. It should be noted that a decimal time can be also convert to hour, minute, and second by using this function. The result is stored in a string object.
Usage
{String} ret = DMS({double} argm1, [{int} argm2] )
argm1 = a decimal degree angle
argm2 = no of decimal digits of second (default = 1)
Example:
->str1 = dms(13.5, 2) ->print a 13 30 00.00 |
See also
deg
Purpose
To convert to a number to a string object.
Usage
{String} ret = DOUBLE2STR({double} argm1, [{int} argm2] )
argm1 = a number wanted to convert to a string
argm2 = no of decimal digits (default = current no of "set precision")
Example:
->str1 = double2str(20.05,7) ->print a 20.0500000 |
See also
dms
Purpose
To calculate a result of the natural log base, e = 2.718281828459045, raised to the power of a number.
Usage
{double} ret = EXP({double} argm1)
argm1 = a number
ret = eargm1
Example:
->a = exp(5) ->print a 148.41316 |
See also
sin, tan
Purpose
To calculate a factorial function of a number.
Usage
{double} ret = FACT({double} argm1)
argm1 = a number
ret = 1* 2 * 3 *...* argm1
Example:
->a = fact(5) ->print a 120.00000 |
See also
dfact
Purpose
To find indices of elements, whose values > 0, in a Matrix_bln.
Usage
{VecINdx} ret = FIND({Matrix_bln} argm1)
argm1 = a Matrix_bln in which indices of elements >0 are to be found
Example:
->A = [ 1 2 3; 4 5 6; 7 8 9] ->v = find(A>4) (Remark: The expression A>4 return a Matrix_bln object) ->print v Vector of Index
(row, column)... |
See also
findimg, count
Purpose
To find x y coordinates of elements, whose values > 0, in a Image_bln.
Usage
{VecPt2D} ret = FINDIMG({Image_bln} argm1)
argm1 = an Image_bln object, in which coordinates of elements >0 are to be found
Example:
->Img = Image(3,3) ->A = [ 1 2 3; 4 5 6; 7 8 9 ] ->Img.matrix() = A ->v = findimg(Img>4) (Remark: The expression Img>4 return a Image_bln object) ->print v Vec of 2D
Point... |
See also
find, count
Purpose
To take away the decimal part of a number, and only leave the integer part.
Usage
{double} ret = FIX({double} argm1)
argm1 = a number
Example:
->a = fix(15.8) ->print a 15.00000 ->a = fix(-15.8) ->print a -15.00000 |
See also
round, ceiling
Purpose
To make a string object from an integer number.
Usage
{String} ret = INT2STR({int} argm1)
argm1 = an integer number
Example:
->s = int2str(699) -> |
See also
double2str
Purpose
To check whether a number is an even number.
Usage
{bool} ret = IS_EVEN({int} argm1)
argm1 = an integer number
Example:
->fact_1 = is_even(699) -> |
See also
is_odd
Purpose
To check whether a number is an odd number.
Usage
{bool} ret = IS_ODD({int} argm1)
argm1 = an integer number
Example:
->fact_1 = is_odd(699) -> |
See also
is_even
Purpose
To check whether a number is smaller than 1E-15, or 0.000000000000001..
Usage
{bool} ret = IS_ZERO({double} argm1)
argm1 = a number
Example:
->fact_1 = is_zero(0.0001) -> |
See also
is_odd, is_even
Purpose
To convert a Julian Date number to a Date object.
Usage
{Date} ret = JD2DATE({int} argm1)
argm1 = integer number, must be between 2415080 (Mar 1, 1900) and 2488070 (Jan 1, 2100).
Example:
->D1 = jd2date(2420005) ->print D1 25/8/1993 time : 12 00 00.0000 |
See also
Date
Purpose
To calculate a natural logarithm function of a number.
Usage
{double} ret = LN({double} argm1)
argm1 = a number
Example:
->a = ln(69.9) ->print a 4.24707 |
See also
log, log2
Purpose
To calculate a logarithm function, base 10, of a number.
Usage
{double} ret = LOG({double} argm1)
argm1 = a number
Example:
->a = log(69.9) ->print a 1.84448 |
See also
ln, log2
Purpose
To calculate a logarithm function, base 2, of a number.
Usage
{double} ret = LOG2({double} argm1)
argm1 = a number
Example:
->a = log2(69.9) ->print a 6.12722 |
See also
ln, log
Purpose
To determine the largest number between the two given numbers.
Usage
{double} ret = MAX({double} argm1, {double} argm2)
argm1 = a number
argm2 = another number
Example:
->a = max(10,100) ->print a 100.00000 |
See also
min
Purpose
To determine the smallest number between the two given numbers.
Usage
{double} ret = MIN({double} argm1, {double} argm2)
argm1 = a number
argm2 = another number
Example:
->a = min(10,100) ->print a 10.00000 |
See also
max
Purpose
To convert a number to a Matrix object.
Usage
{Matrix} ret = NUM2MATRIX({double} argm1)
argm1 = a number
Example:
->A = num2matrix(23.5) ->print A no of
row : 1 |
See also
vec2matrix
Purpose
To return the value of p, which equals to 3.1415926535897932....
Usage
{double} ret = PI()
Example:
->a = pi() -> |
See also
Purpose
To generate a random number.
Usage
{double} ret = RAND([{double} argm1])
argm1 = the maximum possible value of the random number (default = getrandmax())
Example:
->a = rand() -> |
See also
srand, set randmax, getrandmax
Purpose
To round to the nearest integer number..
Usage
{int} ret = ROUND({double} argm1)
argm1 = a number
Example:
->a = round(15.8) ->print a 16.00000 ->a = round(-15.8) ->print a -16.00000 |
See also
fix
Purpose
To calculate a sine function of an angle. The angle unit in a unit set by command "set angle".
Usage
{double} ret = SIN({double} argm1)
argm1 = a number
Example:
->set angle Angle mode = DEG ->a = sin(90) ->print a 1.00000 |
See also
cos, tan
Purpose
To calculate a hyperbolic sine function of an angle.
sinh(x) = (exp(x) - exp(-x)) / 2
Usage
{double} ret = SINH({double} argm1)
argm1 = a number
Example:
->a = sinh(2) ->print a 3.62686 |
See also
cosh, tanh
Purpose
To calculate a square root of a number..
Usage
{double} ret = SQRT({double} argm1)
argm1 = a number
Example:
->a = sqrt(2) ->print a 1.41421 |
See also
Purpose
To initial a new random series. This function is used associated with function "rand".
Usage
{void} SRAND([{int} argm1])
argm1 = a number (default = time())
Example:
->srand(505) -> |
See also
rand, time, set randmax
Purpose
To calculate a tangent function of an angle. The angle unit in a unit set by command "set angle".
Usage
{double} ret = TAN({double} argm1)
argm1 = a number
Example:
->set angle Angle mode = DEG ->a = tan(45) ->print a 1.00000 |
See also
atan, atan2
Purpose
To calculate a hyperbolic tangent function of an angle.
tanh(x) = sinh(x) / cosh(x)
Usage
{double} ret = TANH({double} argm1)
argm1 = a number
Example:
->a = tanh(2) ->print a 0.96403 |
See also
cosh, sinh
Purpose
To read a TIF file and save as an Matrix_uch object in a file.
Usage
{void} TIF2MATRIX({String} argm1, {String} argm2)
argm1 = file name of the input tif file
argm2 = file name of the output Matrix_uch file
Example:
->tif2matrix("scene_1.tif",
"scene_1") -> |
See also
Matrix_uch
Purpose
To give a machine time. The unit is second.
Usage
{double} ret = TIME()
Example:
->a = time() ->print a 998000746.00000 |
See also