|Download Help (Windows Only)|
Owning Class: support
Requires: MathScript RT Module
c = fwrite(fid, a)
c = fwrite(fid, a, type)
c = fwrite(fid, a, type, s)
c = fwrite(fid, a, type, s, byte)
Writes binary data to a file.
|fid||Specifies the identifier for the file to which you want to write. Use the fopen function to open a file and assign it an identifier. fid is an integer.|
|a||Specifies the data you want to write to the file specified by fid. a is a vector or matrix.|
|type||Specifies the data type of a that you want to write to the file specified by fid. If you specify s, you can add a positive integer of the form 'm*' before type. LabVIEW then skips s bytes before each m bytes it writes to the file. type is a string that accepts the following values.
|s||Specifies the number of bytes to skip before each m bytes as you specify in type. s is a positive integer.|
|byte||Specifies the byte order, or endian form, to use when writing data. byte is a string that accepts the following values.
|c||Returns the amount of data that LabVIEW wrote successfully to the file specified by fid. c is a positive integer.|
The following table lists the support characteristics of this function.
|Supported in the LabVIEW Run-Time Engine||Yes|
|Supported on RT targets||Yes|
|Suitable for bounded execution times on RT||Not characterized|
fid = fopen('test.dat', 'w');
a = [-0.1, 0, 0.1; -0.2, 0.1, 0.4];
c = fwrite(fid, a, '4*float32', 2);