Matrix Class Function Manual (S-U) |
Purpose
To save as ASCII format by appending its content to an existing file. If the specified does not exist, the function will create a new file, and the result will be exactly the same as using function "saveasc".
if a file name extension is not given, the function assumes an extension of ".txt".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAPPASC({String} argm1, [{int} argm2, {int} argm3])
argm1 = an existing file name
argm2 = no of decimal digits (default = value set by command "set precision")
argm3 = no of width for each element (default = value set by command "set width")
Example:
->A.sappasc("Mat_1") -> |
See also (class function)
saveasc
Purpose
To save as binary format by appending its content to an existing file. If the specified does not exist, the function will create a new file, and the result will be exactly the same as using function "savebin".
if a file name extension is not given, the function assumes an extension of ".raw".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAPPBIN({String} argm1)
argm1 = an existing file name
Example:
->A.sappbin("Mat_2") -> |
See also (class function)
savebin
Purpose
To save as Noobeed format. The function creates two files, one for documentation and another for data.
The documentation file will have an extension ".txt". It is actually an ASCII file and must have exactly 6 lines (not including comment lines) , as follows.
|
The data file is in fact a generic binary file. First it stores all element of the first row of the matrix, from the first to the last column, then go to the second row, and does the same thing. Hence the size of the data file will be exactly equal to total number of elements of the matrix multiplied by no of bytes per element (8 bytes in this case).
if a file name extension is not given, the function assumes an extension of ".txt" for documentation file and ".raw" for data file.
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVE({String} argm1, [{String} argm2])
argm1 = documentation file name
argm2 = data file name (default = same name as argm1 with extension ".raw")
Example:
->A.save("Mat_3") -> |
See also (class function)
load
Purpose
To save as ASCII format. Each line in the output file represents a row in the matrix. It is very important that the 3rd argument, if specified, is large enough to be able to separate each element within a line. The default is that set by command "set width".
if a file name extension is not given, the function assumes an extension of ".txt".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVEASC({String} argm1, [{int} argm2, {int} argm3])
argm1 = output file name
argm2 = no of decimal digits (default = value set by command "set precision")
argm3 = no of width for each element (default = value set by command "set width")
Example:
->A.saveasc("Mat_1") -> |
See also (class function)
sappasc
Purpose
To save as ASCII format. Each line in the output file represents one element of the matrix, and it has three fields, namely row number, column number and value.
The first line is for the 1st row and the first column element. The second line is for the first row and the second column element. It goes all the way to the last column of the first row, then it starts doing the same thing for the second row and so on.
if a file name extension is not given, the function assumes an extension of ".txt".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVEASCXYZ({String} argm1, [{int} argm2, {int} argm3])
argm1 = output file name
argm2 = no of decimal digits (default = value set by command "set precision")
argm3 = no of width for each element (default = value set by command "set width")
Example:
->A = [ 1 2 3; 4 5 6; 7 8 9] ->A.saveascxyz("Mat_1") (The ASCII output file, "Mat_1.txt", will looks like:
0.000 0.000
1.000 |
See also (class function)
saveasc
Purpose
To save as binary format. First it stores all elements of the first row of the matrix, from the first to the last column, then go to the second row, and does the same thing. Hence the size of the data file will be exactly equal to total number of elements of the matrix multiplied by no of bytes per element (8 bytes in this case).
if a file name extension is not given, the function assumes an extension of ".raw".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVEBIN({String} argm1)
argm1 = an existing file name
Example:
->A.savebin("Mat_2") -> |
See also (class function)
save, sappbin
Purpose
To save as bitmap (BMP) format. The matrix will be first converted to an 8-bit data, and the output file will have an 8-bit gray scale format. Losing of accuracy of data is unavoidable, if the original value range of data is beyond 8 bit, 0 to 255.
if a file name extension is not given, the function assumes an extension of ".bmp".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVEBMP({String} argm1)
argm1 = output file name
Example:
->A.savebmp("Mat_2") -> |
See also (class function)
savetif
Purpose
To save as CSV (Comma-Separated Values) filet. Each line in the output file represents a row in the matrix. Each element in a row will be separated by a comma sign.
if a file name extension is not given, the function assumes an extension of ".txt".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVECSV({String} argm1)
argm1 = output file name
Example:
->A.savecsv("Mat_1") -> |
See also (class function)
sappasc, saveasc, loadcsv
Purpose
To save as Tag Image File (TIF) format. The matrix will be first converted to an 8-bit data, and the output file will have an 8-bit gray scale format. Losing of accuracy of data is unavoidable, if the original value range of data is beyond 8 bit, 0 to 255.
if a file name extension is not given, the function assumes an extension of ".tif".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVETIF({String} argm1)
argm1 = output file name
Example:
->A.savetif("Mat_2") -> |
See also (class function)
savebmp
Purpose
To save as WRL (world file) format, a file format used in Virtual Reality Modeling language (VRML).
The matrix is thought of a Digital Elevation Model (DEM) and the result file can be viewed over internet by using VRML viewing program, within which the user can freely rotate and walk through the model.
A scale factor can be specified by the user so that every pixel's brightness value will be scaled by the given factor before writing to the output file. A default scale factor is computed from the size of the matrix and the maximum height, brightness, difference in the matrix.
if a file name extension is not given, the function assumes an extension of ".wrl".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.SAVEWRL({String} argm1, [{double} argm2])
argm1 = output file name
argm2 = height scale factor
(default = (average of no of row and col) / (max_z - min_z) )
Example:
->A.savewrl("My_world") -> |
See also (class function)
savebmp
Purpose
To determine the value of the standard deviation of all elements in a matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{double} ret = object.SD()
Example:
->A = [1 2 3; 4 5 6; 7 8 9] ->B = A.sd() ->print B 2.73861 |
See also (class function)
max, min, mean
Purpose
To set new value to elements of matrix at particular indices, specified by a list of indices, stored in a VecIndx object.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SET({VecIndx} argm1, {double} argm2)
For class Matrix_flt
{void} object.SET({VecIndx} argm1, {float} argm2)
For class Matrix_int
{void} object.SET({VecIndx} argm1, {int} argm2)
For class Matrix_sht
{void} object.SET({VecIndx} argm1, {short} argm2)
For class Matrix_uch
{void} object.SET({VecIndx} argm1, {uchar} argm2)
For class Matrix_bln
{void} object.SET({VecIndx} argm1, {bool} argm2)
argm1 = a vector stored indices at which a new value being assigned
argm2 = a new value which will be assigned to elements at indices specified by argm1
Example:
->A = [ 1 2 3; 4 5 6; 7 8 9 ] ->v = find(A>5) ->A.set(v,999) ->print A
no of row : 3 |
See also (class function)
find (global function)
Purpose
To set value to diagonal block elements of a block matrix. The calling matrix must have an appropriate size, for example its no of row must be an integer times of that of the argument matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SETBDIAG({Matrix} argm1)
For class Matrix_flt
{void} object.SETBDIAG({Matrix_flt} argm1)
For class Matrix_int
{void} object.SETBDIAG({Matrix_int} argm1)
For class Matrix_sht
{void} object.SETBDIAG({Matrix_sht} argm1)
For class Matrix_uch
{void} object.SETBDIAG({Matrix_uch} argm1)
For class Matrix_bln
{void} object.SETBDIAG({Matrix_bln} argm1)
argm1 = A matrix being set along the diagonal of the calling matrix
Example:
->A = [ 1 2; 3 4] |
See also (class function)
initbdiag
Purpose
To set a new value for an entire specified column.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SETCOL({int} argm1, {double} argm2)
For class Matrix_flt
{void} object.SETCOL({int} argm1, {float} argm2)
For class Matrix_int
{void} object.SETCOL({int} argm1, {int} argm2)
For class Matrix_sht
{void} object.SETCOL({int} argm1, {short} argm2)
For class Matrix_uch
{void} object.SETCOL({int} argm1, {uchar} argm2)
For class Matrix_bln
{void} object.SETCOL({int} argm1, {bool} argm2)
argm1 = column number at which a new value is assigned to its elements
argm2 = new value that set to all elements in the column specified by argm1
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9 ] |
See also (class function)
setrow
Purpose
To set value to diagonal elements of a square matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SETDIAG({double} argm1)
For class Matrix_flt
{void} object.SETDIAG({float} argm1)
For class Matrix_int
{void} object.SETDIAG({int} argm1)
For class Matrix_sht
{void} object.SETDIAG({short} argm1)
For class Matrix_uch
{void} object.SETDIAG({uchar} argm1)
For class Matrix_bln
{void} object.SETDIAG({bool} argm1)
argm1 = value to be set to diagonal elements
Example:
->A = Matrix(3,3) |
See also (class function)
initdiag
Purpose
To set a new value for an entire specified row.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SETROW({int} argm1, {double} argm2)
For class Matrix_flt
{void} object.SETROW({int} argm1, {float} argm2)
For class Matrix_int
{void} object.SETROW({int} argm1, {int} argm2)
For class Matrix_sht
{void} object.SETROW({int} argm1, {short} argm2)
For class Matrix_uch
{void} object.SETROW({int} argm1, {uchar} argm2)
For class Matrix_bln
{void} object.SETROW({int} argm1, {bool} argm2)
argm1 = row number at which a new value is assigned to its elements
argm2 = new value that set to all elements in the row specified by argm1
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9 ] |
See also (class function)
setcol
Purpose
To set a symbol at a particular index in a matrix. A symbol is realized by using a matrix, which is one of arguments given by the user.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SETSYMB({int} argm1, {int} argm2, {Matrix} argm3)
For class Matrix_flt
{void} object.SETSYMB({int} argm1, {int} argm2, {Matrix_flt} argm3)
For class Matrix_int
{void} object.SETSYMB({int} argm1, {int} argm2, {Matrix_int} argm3)
For class Matrix_sht
{void} object.SETSYMB({int} argm1, {int} argm2, {Matrix_sht} argm3)
For class Matrix_uch
{void} object.SETSYMB({int} argm1, {int} argm2, {Matrix_uch} argm3)
For class Matrix_bln
{void} object.SETSYMB({int} argm1, {int} argm2, {Matrix_bln} argm3)
argm1 = row number at which the center of the symbol is placed
argm2 = column number at which the center of the symbol is placed
argm3 = matrix being used as a symbol to place on the calling matrix
Example:
->A = [ 0 1 0; 1
1 1; 0 1 0 ] |
See also (class function)
setwindow
Purpose
To set a symbol at particular indices, specified by a VecIndx object. A symbol is realized by using a matrix, which is one of arguments given by the user.
Class
Matrix_uch
Usage
{void} object.SETVECSYMB({VecIndx} argm1, {Matrix_uch} argm2)
argm1 = a vector contains row and column numbers of centers of the symbol
argm2 = matrix being used as a symbol to place on the calling matrix
Example:
->A = [ 0 1 0; 1
1 1; 0 1 0 ] |
See also (class function)
setsymb
Purpose
To set a sub-matrix at a particular index in a matrix. This function is very similar to function "setsymb", except that the position at which the sub-matrix is placed is the upper left corner of the sub-matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{void} object.SETWINDOW({int} argm1, {int} argm2, {Matrix} argm3)
For class Matrix_flt
{void} object.SETWINDOW({int} argm1, {int} argm2, {Matrix_flt} argm3)
For class Matrix_int
{void} object.SETWINDOW({int} argm1, {int} argm2, {Matrix_int} argm3)
For class Matrix_sht
{void} object.SETWINDOW({int} argm1, {int} argm2, {Matrix_sht} argm3)
For class Matrix_uch
{void} object.SETWINDOW({int} argm1, {int} argm2, {Matrix_uch} argm3)
For class Matrix_bln
{void} object.SETWINDOW({int} argm1, {int} argm2, {Matrix_bln} argm3)
argm1 = row number at which the upper left corner of the sub-matrix is placed
argm2 = row number at which the upper left corner of the sub-matrix is placed
argm3 = sub-matrix being placed on the calling matrix
Example:
->A = [ 1 2; 3 4] |
See also (class function)
setsymb
Purpose
To convert to a Matrix_sht object.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{Matrix_sht} ret = object.SHORT()
Example:
->A = [1 2 3; 4 5
6; 7 8 9] |
See also (class function)
double, float, int, uchar, bool
Purpose
To calculate a sine function of a Matrix. The angle unit is that set by command "set angle".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{Matrix} ret = object.SIN()
Example:
->set angle "deg" |
See also (class function)
tan, cos
Purpose
To report the size of a matrix, no of rows and columns.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{Indx} ret = object.SIZE()
Example:
->A = [ 1 2 3; 4 5 6; 7 8 9] ->A.size() ans = (3 , 3) |
See also (class function)
nrow, ncol
Purpose
To decrease the size of a matrix by skipping a certain number of rows and columns.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.SKIP({int} argm1)
For class Matrix_flt
{Matrix_flt} ret = object.SKIP({int} argm1)
For class Matrix_int
{Matrix_int} ret = object.SKIP({int} argm1)
For class Matrix_sht
{Matrix_sht} ret = object.SKIP({int} argm1)
For class Matrix_uch
{Matrix_uch} ret = object.SKIP({int} argm1)
For class Matrix_bln
{Matrix_bln} ret = object.SKIP({int} argm1)
argm1 = no of rows and columns being skipped
Example:
->a = Matrix(100,100) ->b = a.skip(1) ->print b.size() (50 , 50) |
See also (class function)
window, pyramid
Purpose
To sort a matrix according to a key column, specified by the user.
The sorting is done by treating each row as a single piece of data, and they are to be sorted according to its value in the key column, which is given the function argument.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln, Matrix_str
Usage
For class Matrix
{Matrix} ret = object.SORT({int} argm1)
For class Matrix_flt
{Matrix_flt} ret = object.SORT({int} argm1)
For class Matrix_int
{Matrix_int} ret = object.SORT({int} argm1)
For class Matrix_sht
{Matrix_sht} ret = object.SORT({int} argm1)
For class Matrix_uch
{Matrix_uch} ret = object.SORT({int} argm1)
For class Matrix_bln
{Matrix_bln} ret = object.SORT({int} argm1)
For class Matrix_str
{Matrix_str} ret = object.SORT({int} argm1)
argm1 = column number of the key column (default = 0)
Example:
->A = Matrix(6,4) |
See also (class function)
sortall
Purpose
To sort all elements of a matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.SORTALL()
For class Matrix_flt
{Matrix_flt} ret = object.SORTALL()
For class Matrix_int
{Matrix_int} ret = object.SORTALL()
For class Matrix_sht
{Matrix_sht} ret = object.SORTALL()
For class Matrix_uch
{Matrix_uch} ret = object.SORTALL()
For class Matrix_bln
{Matrix_bln} ret = object.SORTALL()
Example:
->A = Matrix(6,4) |
See also (class function)
sort
Purpose
To perform a general linear stretching.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.STRETCH([{double} argm1, {double} argm2])
For class Matrix_flt
{Matrix_flt} ret = object.STRETCH([{double} argm1, {double} argm2])
For class Matrix_int
{Matrix_int} ret = object.STRETCH([{double} argm1, {double} argm2])
For class Matrix_sht
{Matrix_sht} ret = object.STRETCH([{double} argm1, {double} argm2])
For class Matrix_uch
{Matrix_uch} ret = object.STRETCH([{double} argm1, {double} argm2])
For class Matrix_bln
{Matrix_bln} ret = object.STRETCH([{double} argm1, {double} argm2])
argm1 = start value of the stretching range (default = 0)
argm2 = end value of the stretching range (default = 255)
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9] |
See also (class function)
stretchfix, stretchsat
y
Purpose
To perform a linear stretching with fix interval. In other words, the stretching will be done within a specific range.
Values that are less than the specified range will be assigned the new value as the minimum value of the stretching range. Values that are larger than the specified range will be assigned the new value as the maximum value of the stretching range.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
For class Matrix_flt
{Matrix_flt} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
For class Matrix_int
{Matrix_int} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
For class Matrix_sht
{Matrix_sht} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
For class Matrix_uch
{Matrix_uch} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
For class Matrix_bln
{Matrix_bln} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
argm1 = start value of the original range being stretched
argm2 = end value of the original range being stretched
argm3 = start value of the stretching range (default = 0)
argm4 = end value of the stretching range (default = 255)
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9] |
See also (class function)
stretch, stretchsat
Purpose
To perform a linear stretching with saturation.
The user gives an amount of percent, a so-called percent of saturation, say 5 percents. Then the function calculate 2 fixed values. One is the value that 5 percents of the data will have values less than it. The second one is the value that 5 percents of the data will have values larger than it. These two fixed values will be used to perform a linear stretching with fixed interval.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
For class Matrix_flt
{Matrix_flt} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
For class Matrix_int
{Matrix_int} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
For class Matrix_sht
{Matrix_sht} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
For class Matrix_uch
{Matrix_uch} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
For class Matrix_bln
{Matrix_bln} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
argm1 = percent of saturation
argm2 = start value of the stretching range (default = 0)
argm3 = end value of the stretching range (default = 255)
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9 ] |
See also (class function)
stretch, stretchfix
Purpose
To make a string object from a Matrix_uch object.
Class
Matrix_uch
Usage
{String} ret = object.STRING()
Example:
->A = [65 66 67; 68 69 70] ->B = A.string() ->print B ABCDEF |
See also (class function)
SUM
Purpose
To compute the summation value of all elements in a matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{double} ret = object.SUM()
Example:
->A = [1 2 3; 4 5 6; 7 8 9] ->B = A.sum() ->print B 45.00000 |
See also (class function)
max, min, mean
Purpose
To swap columns in a matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.SWAPCOL({int} argm1, {int} argm2)
For class Matrix_flt
{Matrix_flt} ret = object.SWAPCOL({int} argm1, {int} argm2)
For class Matrix_int
{Matrix_int} ret = object.SWAPCOL({int} argm1, {int} argm2)
For class Matrix_sht
{Matrix_sht} ret = object.SWAPCOL({int} argm1, {int} argm2)
For class Matrix_uch
{Matrix_uch} ret = object.SWAPCOL({int} argm1, {int} argm2)
For class Matrix_bln
{Matrix_bln} ret = object.SWAPCOL({int} argm1, {int} argm2)
argm1 = first column number to be swapped
argm2 = second column number to be swapped
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9 ] |
See also (class function)
swaprow
Purpose
To swap rows in a matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
For class Matrix
{Matrix} ret = object.SWAPROW({int} argm1, {int} argm2)
For class Matrix_flt
{Matrix_flt} ret = object.SWAPROW({int} argm1, {int} argm2)
For class Matrix_int
{Matrix_int} ret = object.SWAPROW({int} argm1, {int} argm2)
For class Matrix_sht
{Matrix_sht} ret = object.SWAPROW({int} argm1, {int} argm2)
For class Matrix_uch
{Matrix_uch} ret = object.SWAPROW({int} argm1, {int} argm2)
For class Matrix_bln
{Matrix_bln} ret = object.SWAPROW({int} argm1, {int} argm2)
argm1 = first row number to be swapped
argm2 = second row number to be swapped
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9 ] |
See also (class function)
swapcol
Purpose
To calculate a tangent function of a Matrix. The angle unit is that set by command "set angle".
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{Matrix} ret = object.TAN()
Example:
->set angle "deg" |
See also (class function)
sin, cos
Purpose
To determine a transpose matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{Matrix} ret = object.TSP()
Example:
->A = [ 1 2 3; 4
5 6; 7 8 9 ] 0:
1.00000 4.00000 7.00000 |
See also (class function)
inv
Purpose
To convert to a Matrix_uch object.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{Matrix_uch} ret = object.UCHAR()
Example:
->A = [1 2 ; 45
90] |
See also (class function)
double, float, int, short, bool
Purpose
To create a unit, identity, matrix.
Class
Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln
Usage
{void} object.UNIT({int} argm1)
argm1 = size of the unit matrix
Example:
->A = Matrix() |
See also (class function)
init, Rxyz
Purpose
To update tyhe content of a column of a Matrix. This function is for Matrix_str only.
Class
Matri_str
Usage
{void} object.UPDATE({int} argm1, {int} argm2, {Matrix_str} argm3, {int} argm4, {int} argm5)
argm1 = the column number of the calling Matrix to be updated
argm2 = the column number of the calling Matrix to be used as key data
argm3 = the lookup table matrix
argm4 = the column number of the lookup table matrix containing updating data
argm5 = the column number of the lookup table matrix containing key data
Example:
->Table1 = Matrix_str() |
See also (class function)
mupdate