Contents Previous Next Subchapters

Writing an O-Matrix Native Format Binary File
Syntax omwrite(filematrix)
omwrite(
filematrixvarNames)
See Also omread , read , bread , bwrite

Description
Stores the variable type, dimension, name, and value of expression matrix in the file specified by the file name file. If the file name file does not include a suffix, the omwrite function will append the string .OMD to file. If the file specified by file exists it is overwritten. The type of matrix must be "int", "real", "double", or "complex".

If specified the variable varNames is a character matrix where row 1 is the variable name for the first column of matrix, row 2 is the variable name for the second column, etc. The number of rows in varNames must be less than or equal the coldim of matrix.

See the omread function for more details on the information that is stored in O-Matrix format binary files.

Example
If you enter,
    x = [1.1, 1.2]
    omwrite("tst", x)
O-Matrix will create a new file, tst.OMD in the current working directory that contains the matrix x If you continue the example above by entering
    omwrite("tst", x, {"Col 1", "Two"})
O-Matrix will re-create the file tst.OMD and store the strings "Col 1" and "Two" to specify the names of each column of variable x.

See the omread function for more detailed examples of using the omwrite and omread functions.