Write to a NASTRAN Output2 file.
writenas(table)
filename=writenas(filename,table,'append','silent','noprogbar','logfile')
WRITENAS writes tables to a NASTRAN OP2 file.
TABLES is a structure containing the output tables and/or matrices to write. The structure must have fieldnames equal to the names of the tables/matrices to write. Each of these fields must be a structure containing the field 'trailer'. 'trailer' is a 1x6 INT32 vector containing the table trailer values.
Table structures must also contain the field 'record'. 'record' is a cell array of INT32 vectors containing the record contents.
Matrix structures must also contain the fields 'colstart', 'rownum', and 'start'. These all contain INT32 vectors containing the sparse format information that defines the matrix.
You are responsible for handling endian formatting of the data. If you are creating a new OP2 file there won't be any endian issues because WRITENAS will create the file with the platform-native endianness. If you are appending to an existing file, you should check for the endianness of the OP2 file before writing to it, and handle your data accordingly.
Several optional input arguments are supported. FILENAME is a string containing the filename to be read. It must include the extension of the file to write. If FILENAME is not specified, or FILENAME contains wildcards (i.e. '*.op2'), a standard file dialog will appear. If FILENAME contains wildcards, it will be used as a filter for the file dialog.
Several string input arguments are also supported.
'append' | Append to an existing OP2 file if it exists |
'silent' | Suppress output |
'noprogbar' | Don't display progress bar at all |
'logfile' | Write external log file (.lis) containing processing details (default is no log file will be written) |
FILENAME is a string containing the full path and filename of the file written.