Binary File Writer
Writing data to binary files.
blockType: Binary File Writer
Path in the library:
|
Description
Block Binary File Writer writes multichannel signal data to a binary file. In the block parameters, you can specify the file name and the structure of the header that will be recorded before the input data. If the header is not needed, then you should specify it in the parameter field File header empty brackets `()'. The first time a block is written to a file, it writes a header followed by data. On subsequent calls, the block records the remaining data.
To record matrices, the block uses one of two indexing options, which is specified in the parameter Indexing mode. By default, line-by-line notation is used (Row-major
). For example, if the input matrix has the form [1 2 4 5; 8 7 9 2
], the block records data in the form [1 2 4 5 8 7 9 2
].
Ports
Input
#
IN_1
—
write data
scalar
| vector
| matrix
Details
The write block writes data to the file specified in the parameters File name. If there is a header File header, the block writes it to the file before writing the data. The block can write floating point and integer data. The input data can be real or complex. If the data is complex, the block writes it as alternating real and imaginary components. The write block assumes the standard by default byte order set on the host machine.
Data types |
|
Complex numbers support |
Yes |
Parameters
Main
# File name — file name
Details
The name of the file to which the block writes data. The file can have any extension.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
# File header — file header
Details
If no header is required, then empty brackets ()
should be specified in the field. If a header is required, then the field should contain a named tuple (field1 = value, …, fieldN = valueN
), values can be strings, numbers, one-dimensional vectors of numbers and two-dimensional matrices of numbers.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Indexing mode —
indexing order for matrix entries
Row-major
| Column-major
Details
Select how the block will write data:
-
Row-major
- the input matrix is written to the file by rows; -
Column-major
- the input matrix is written to the file by columns.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |