Write to a NASTRAN Output4 file.
writeop4(mat)
writeop4(mat,'binary','sparse')
filename = writeop4(fname,mat,ndigits,'append','silent')
WRITEOP4 exports matrices to NASTRAN Output4 (OP4) format.
MAT is a structure containing the matrices. More than one entry may be supplied. It must at minimum have the following fields:
.name | String (8 characters maximum) containing the matrix name. |
.matrix | Matrix to export. |
.form | (optional) Form of matrix. If present, will override matrix form entry in OP4 file. See PARSEOP4 for valid entries. Use [] for default. For use in cases where the OP4 consuming program requires a different value. |
FNAME is an optional input string containing the name of the OP4 file to write. If not supplied, or it contains wildcard characters ('*' or '?'), the user will be prompted with a graphical file dialog.
NDIGITS specifies the number of digits after the decimal when writing an ASCII file. The default is 15. WRITEOP4 will determine the appropriate format specifier based on this value.
MAT is a structure containing the matrices. More than one entry may be supplied. It must at minimum have the following fields:
'binary' | SWrite OP4 file in binary format (default) |
'ascii' | Matrix to export. |
'sparse' | Write OP4 file matrices in sparse format (default is the type of the MATLAB matrix) |
'dense | Write OP4 file matrices in dense format (default is the type of the MATLAB matrix) |
'append' | Append the OP4 file, forcing the same format (default is to overwrite) |
'bigendian' | Write the data in big endian format (default is little endian) |
'64bit' | Write OP4 in 64-bit format (default) |
'32bit' | Write OP4 in 32-bit format |
'noprogbar' | Disables progress bar |
'silent' | Suppresses command window output |
FOUTNAME contains the path and filename of the file written/appended to.
Implementation notes: