User`s guide

fwrite
Purpose Write binary data to open target PC file
Syntax MATLAB command line
fwrite(file_obj,file_ID,A)
file_obj.fwrite(file_ID,A)
Arguments
file_obj
Name of the xpctarget.fs object.
file_ID
File id entifier of the fil e to write.
A
Elements of matrix A to be w ritten to the specified file.
Description Method of xpcta rget .fs objects. From the host PC, writes the elements
of matrix
A to the file identified by file_ID.Thedataiswrittento
thefileincolumnorder. The
file_ID argument is the file identifier
associated with an open file (see
fopen). fwrite requires that the file
be open w ith write permiss ion.
Examples Open the file dat a.dat in the target PC file system object fsys. Assign
the resulting file handle to a variable for writing.
h = fopen(fsys,'data.dat','w')
or
fsys.fopen('data.dat','w')
ans =
2883584
d = fwrite(fsys,h,magic(5));
This writes the elements of matrix A tothefilehandleh.Thiscontentis
writtenincolumnorder.
18-24