User`s guide

fread
14-25
14fread
Purpose Read open target PC file
Syntax MATLAB command line
fread(file_obj,file_ID)
file_obj.fread(file_ID)
Arguments
Description Method of xpctarget.fs objects. From the host PC, reads the binary data from
the file on the target PC and writes it into matrix A. The
file_ID argument is
the file identifier associated with an open file (see
fopen).
Examples Open the file data.dat in the target PC file system object fsys. Assign the
resulting file handle to a variable for reading.
h = fopen(fsys,'data.dat') or fsys.fopen('data.dat')
ans =
2883584
d = fread(h);
This reads the file data.dat and stores the contents of the file to d. This content
is in the xPC Target file format.
See Also xPC Target file object methods fclose, fopen, and fwrite.
MATLAB
fread function.
file_obj
Name of the xpctarget.fs object.
file_ID
File identifier of the file to read.