next up previous contents
Next: Data reorganization Up: Matrices Previous: Matrix structure

Matrix commands

    

tabular698

These commands are used to manipulate the data structures in the NDA. The data frame "d2m" can contain several fields, each of these fields are converted to a matrix structure. The command f2m converts only one field into a matrix. The command m2d converts a matrix into a data frame which can be saved or used with other NDA commands. The command shape is used for changing the dimensions of the matrices. The matrices are actually data frames with fields defined as matrix structures. REMARK! Matrices cannot be saved as matrices, but they must be converted to a normal data frame before saving.

Example (ex2.3): This example shows how these commands can be used for changing the data format inside the NDA.

...
NDA> load sin.dat
# change data fields into 2x10 matrices (mat.x and mat.y) 
NDA> d2m -d sin -mout mat -dim 2 2 10
# change field sin.x into 2x10 matrix.
NDA> f2m -f sin.x -mout matx -dim 2 2 10
# create a new matrix from "mat" with different shape
NDA> shape -m mat -mout matr -dim 2 4 5
# create a new data frame from the matrix 
NDA> m2d -m matr -dout data
# save the new data frame 
NDA> save data
...



Erkki Hakkinen
Thu Sep 24 11:51:34 EET DST 1998