Matrix Class Function Manual (V-Z)

VAR

| HOME | BACK |

Purpose

To determine the value of the variance of all elements in a matrix.

Class

Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln

Usage

{double} ret  =  object.VAR()

Example:

->A = [1 2 3; 4 5 6; 7 8 9]

->B = A.var()

->print B

        7.50000

See also (class function)

max, min, mean, sd

| HOME | BACK |


VECIDINDX

| HOME | BACK |

Purpose

To convert to a VecIdIndx object.  Each row in a matrix is considered an IdIndx object.  Thus, it must have at least 4 columns, where the 1st column is to be ID, the 2nd is row number, the 3r is column number and the 4th is standard deviation.

Class

Matrix

Usage

{double} ret  =  object.VECIDINDX()

Example:

->a = [1 2 3 4; 5 6 7 8]
->v = a.vecidindx()
->v

ans =
List of ID Index (row, column)...

list id : 0

Vector size : 2

1 ( 2 , 3) 4.000
5 ( 6 , 7) 8.000

See also (class function)

vecidpt1d, vecidpt2d, vecidpt3d, vecindx, vecpt2d, vecpt3d

| HOME | BACK |


VECIDPT1D

| HOME | BACK |

Purpose

To convert to a VecIdPt1D object.  Each row in a matrix is considered a IdPt1D object.  Thus, it must have at least 3 columns, where the 1st column is to be ID, the 2nd is x coordinate and the 3rd is standard deviation.

Class

Matrix

Usage

{double} ret  =  object.VECIDPT1D()

Example:

->a = [ 1 2 3; 4 5 6]
->v = a.vecidpt1d()
->print v

List of 1D ID-Point...

list id : 0

Vector size : 2

1 ( 2.000) 3.000
4 ( 5.000) 6.000

See also (class function)

vecidindx, vecidpt2d, vecidpt3d, vecindx, vecpt2d, vecpt3d

| HOME | BACK |


VECIDPT2D

| HOME | BACK |

Purpose

To convert to a VecIdPt2D object.  Each row in a matrix is considered a IdPt2D object.  Thus, it must have at least 4 columns, where the 1st column is to be ID, the 2nd is x coordinate, the 3rd is y coordinate, and the 4th is standard deviation.

Class

Matrix

Usage

{double} ret  =  object.VECIDPT2D()

Example:

->a = [ 1 2 3 4 ; 5 6 7 8 ]
->v = a.vecidpt2d()
->print v

List of 2D ID-Point...

list id : 0

Vector size : 2

1 ( 2.000 , 3.000) 4.000

5 ( 6.000 , 7.000) 8.000

See also (class function)

vecidpt1d, vecidindx, vecidpt3d, vecindx, vecpt2d, vecpt3d

| HOME | BACK |


VECIDPT3D

| HOME | BACK |

Purpose

To convert to a VecIdPt3D object.  Each row in a matrix is considered a IdPt3D object.  Thus, it must have at least 5 columns, where the 1st column is to be ID, the 2nd is x coordinate, the 3rd is y coordinate,  the 4th is z coordinate, and the 5th is standard deviation.

Class

Matrix

Usage

{double} ret  =  object.VECIDPT3D()

Example:

->a = [ 1 2 3 4 5 ; 6 7 8 9 10]
->v = a.vecidpt3d()
->print v

List of 3D ID-Point...

list id : 0

Vector size : 2

1 ( 2.000 , 3.000 , 4.000) 5.000
6 ( 7.000 , 8.000 , 9.000) 10.000

See also (class function)

vecidpt1d, vecidpt2d, vecidindx, vecindx, vecpt2d, vecpt3d

| HOME | BACK |


VECINDX

| HOME | BACK |

Purpose

To convert to a VecIndx object.  Each row in a matrix is considered an Indx object.  Thus, it must have at least 2 columns, where the 1st column is row number, the 2nd is column number.

Class

Matrix

Usage

{double} ret  =  object.VECINDX()

Example:

->a = [ 1 2 ; 3 4]
->v = a.vecindx()
->print v

Vector of Index (row, column)...

list id : 0

Vector size : 2

(1 , 2)
(3 , 4)

See also (class function)

vecidpt1d, vecidpt2d, vecidpt3d, vecidindx, vecpt2d, vecpt3d

| HOME | BACK |


VECPT2D

| HOME | BACK |

Purpose

To convert to a VecPt2D object.  Each row in a matrix is considered a Pt2D object.  Thus, it must have at least 2 columns, where the 1st column is x coordinate and the 2nd is y coordinate.

Class

Matrix

Usage

{double} ret  =  object.VECPT2D()

Example:

->a = [ 1 2 ; 3 4]
->v = a.vecpt2d()
->print v

Vec of 2D Point...

list id : 0

Vector size : 2

( 1.000 , 2.000)
( 3.000 , 4.000)

See also (class function)

vecidpt1d, vecidpt2d, vecidpt3d, vecindx, vecidindx, vecpt3d

| HOME | BACK |


VECPT3D

| HOME | BACK |

Purpose

To convert to a VecPt3D object.  Each row in a matrix is considered a Pt3D object.  Thus, it must have at least 3 columns, where the 1st column is x coordinate, the 2nd is y coordinate, and the 3rd is z coordinate.

Class

Matrix

Usage

{double} ret  =  object.VECPT3D()

Example:

->a = [ 1 2 3 ; 4 5 6 ]
->v = a.vecpt3d()
->print v

Vec of 3D Point...

list id : 0

Vector size : 2

( 1.000 , 2.000 , 3.000)
( 4.000 , 5.000 , 6.000)

See also (class function)

vecidpt1d, vecidpt2d, vecidpt3d, vecindx, vecpt2d, vecidindx

| HOME | BACK |


VECSTR

| HOME | BACK |

Purpose

To convert to a String Vector (VecStr) object.  Noobeed will take only the first column and makes each element to a string and stores in a vector.   

Class

Matrix

Usage

{VecStr} ret = object.VECSTR({double} argm1)

argm1 = number of decimal points (default = current precision set by command set precision)

Example:

->a = [ 1 2 3; 4 5 6; 7 8 9]
->a

ans =

no of row : 3
no of column : 3

0: 1.00000 2.00000 3.00000
1: 4.00000 5.00000 6.00000
2: 7.00000 8.00000 9.00000



->a.vecstr()

ans =
Vector size : 3

1.0000000
4.0000000
7.0000000

->

See also (class function)

global function  double2str   int2str

| HOME | BACK |


VECTOR

| HOME | BACK |

Purpose

To convert to a Vector object.  Each element in a matrix is considered an element in a Vector object.  Thus the size of the vector is equal to the total number of elements in a matrix.

Class

Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln

Usage

{double} ret  =  object.VECTOR()

Example:

->a = [ 1 2 3 ; 4 5 6 ]
->v = a.vector()
->v

ans =
Vector size : 6

1.00000
2.00000
3.00000
4.00000
5.00000
6.00000

See also (class function)

vecidpt1d, vecidpt2d, vecidpt3d, vecindx, vecpt2d, vecpt3d

| HOME | BACK |


VLOAD

| HOME | BACK |

Purpose

To virtually load a Matrix object, saved as Noobeed format.  The document file is read but not thedata file.  The function simply opens the data file and waits for the user to request data.  This function is particuilarily useful when the data file is large and the user doen not want to do load the data into memory.  

Please note that only a limited set of functions is available for a virtually loaded matrix.  Function supported in a vload matrix are goget, goset, gosetmat, window, skip, stretch, stretchfix, min, max, mean, sd, var, and those functions that do not require contents in the data file, such as nrow, ncol, rc2no, no2rc etc.

When finish using the vload object, use the class function close() to close the data file.

Class

Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln

Usage

{void} object.VLOAD({String} argm1, [{String} argm2])

argm1 = file name for the documentation file (default extension is ".txt")

argm2 = file name for the data file  

        (default file name is same file name as argm1 with an extension ".raw")

Example:

->A = Matrix()

->A.vload("my_matrix")

->

See also (class function)

loadtif, loadbmp, loadasc, loadbin, save, savetif, savebmp, saveasc, savebin

| HOME | BACK |


WINDOW

| HOME | BACK |

Purpose

To cut a window out of a matrix.

Class

Matrix, Matrix_flt, Matrix_int, Matrix_sht, Matrix_uch, Matrix_bln

Usage

For class Matrix

{Matrix} ret  =  object.WINDOW({int} argm1, {int} argm2, {int} argm3, {int} argm4)

For class Matrix_flt

{Matrix_flt} ret  =  object.WINDOW({int} argm1, {int} argm2, {int} argm3, {int} argm4)

For class Matrix_int

{Matrix_int} ret  =  object.WINDOW({int} argm1, {int} argm2, {int} argm3, {int} argm4)

For class Matrix_sht

{Matrix_sht} ret  =  object.WINDOW({int} argm1, {int} argm2, {int} argm3, {int} argm4)

For class Matrix_uch

{Matrix_uch} ret  =  object.WINDOW({int} argm1, {int} argm2, {int} argm3, {int} argm4)

For class Matrix_bln

{Matrix_bln} ret  =  object.WINDOW({int} argm1, {int} argm2, {int} argm3, {int} argm4)

argm1 = first row number to be cut

argm2 = last row number to be cut

argm3 = first column number to be cut

argm4 = last column number to be cut

Example:

->a = [ 1 2 3; 4 5 6; 7 8 9]
->b = a.window(0,1,0,1)
->print b


 no of row    : 2
 no of column : 2

 0:    1.00000    2.00000
 1:    4.00000    5.00000

See also (class function)

setwindow, skip

| HOME | BACK |