Matrix_cmp |
Overview
Matrix_cmp is a two-dimensional array of complex number, class "Complex". A complex number consists of a real part and an imaginary part, both are of double precision type.
A matrix_cmp can have a null data, so that a particular element whose value equal to the specified value of nulldata will be omitted in matrix computation, for example calculation of minimum, maximum, or in matrix operation, for e.g. matrix overlay.
A matrix_cmp also has a flag_null, and its value can be 0 (off) or 1 (on). When flag_null = 0, there is no omission of nulldata.
Member data
Name | Data type | Meaning |
nrow | int | number of rows |
ncol | int | number of columns |
flag_null | bool | a flag indicates whether the null data is omitted in computation(0 = no, 1 = yes) |
nulldata | double | value of null data (not application if flag_null = 0) |
Operator
See details in operator section.
Construction function
{Matrix_cmp} ret = MATRIX_CMP([{int} argm1, {int} argm2, {Complex} argm3])
argm1 = no of row (default = 0)
argm2 = no of column (default = 0)
argm3 = initial value (default = 0)
Example:
->A = Matrix_cmp() ->print A
no of row : 0 no of column : 0
->B = Matrix_cmp(3,2, Complex(1,5)) ->B
ans =
no of row : 3 no of column : 2
0: 1.000 + 5.000i 1.000 + 5.000i 1: 1.000 + 5.000i 1.000 + 5.000i 2: 1.000 + 5.000i 1.000 + 5.000i
|
Lfunction
object({int} argm1, {int} argm2) = {Complex} left-value
argm1 = row index
argm2 = column index
object.FLAG_NULL() = {bool} left-value
object.NULLDATA() = {double} left-value
Example:
->B(0,0) = Complex(999,999) ->B
ans =
no of row : 3 no of column : 2
0: 999.000 + 999.000i 1.000 + 5.000i 1: 1.000 + 5.000i 1.000 + 5.000i 2: 1.000 + 5.000i 1.000 + 5.000i
->B.flag_null()
ans = 0
->B.flag_null() = 1 ->B.flag_null()
ans = 1
->B.nulldata()
ans = 0
->B.nulldata() = -90 ->B.nulldata()
ans = -90.000 ->B(0,0) = Complex(999,999) ->B
ans =
no of row : 3 no of column : 2
0: 999.000 + 999.000i 1.000 + 5.000i 1: 1.000 + 5.000i 1.000 + 5.000i 2: 1.000 + 5.000i 1.000 + 5.000i
->B.flag_null()
ans = 0
->B.flag_null() = 1 ->B.flag_null()
ans = 1
->B.nulldata()
ans = 0
->B.nulldata() = -90 ->B.nulldata()
ans = -90.000 |
Class function
A-D | E-H | I-L | M-P | Q-S | T-Z |
( ) | FFT | IFT | MAX | RC2NO | TSP |
ABS | FLAG_NULL | IMG* | MIN | REAL* | WINDOW |
AMP* | FLIPLR | INIT | MULT121 | RESHAPE | |
COMPMAX | FLIPUD | INITBDIAG | NCOL | REVERSE | |
COMPMIN | GETCOL | INITDIAG | NO2RC | SAVE | |
CONCAT | GETROW | LOAD | NROW | SAVEASC | |
CONCATDOWN | LOADASC | NULLDATA | SAVEASCXYZ | ||
LOADBIN | PRODCOL | SAVEBIN | |||
LOADBIN_OFFSET | PRODROW | SET | |||
SETBDIAG | |||||
SETDIAG | |||||
SETWINDOW | |||||
SIZE | |||||
SKIP | |||||
SORT | |||||
SORTALL | |||||
SUM | |||||
SWAPCOL | |||||
SWAPROW |
* for class MATRIX_CMP only