readxpcfile - Interpret raw data from xPC Target™ file format

Synopsis

file=readxpcfile(data)
readxpcfile('filename')

Arguments

data

Vector of uint8 bytes.

'filename'

File from which the vector of uint8 bytes is read. Vector is written

Description

The readxpcfile function converts xPC Target file format content (in bytes) to double precision data. A scope of type file creates the data. After you download the data from a target PC, use one of the following to read the data:

file=readxpcfile(data) converts data to double precision data representing the signals and timestamps.

readxpcfile('filename') converts contents of 'filename' to double precision data representing the signals and timestamps.

Examples

Use the xpctarget.fs object to convert data:

f=xpctarget.fs;
h=f.fopen('filename');
data=f.fread(h);
f.fclose(h);
file = readxpcfile(data);

Use the xpctarget.ftp object in one of the following ways to convert data:

xpcftp=xpctarget.ftp
xpcftp.get('filename')
eadxpcfile('filename')
handle=fopen('filename')
data=fread(handle,'*uint8'); % Data should be read in uint8 format
fclose(handle
data=data';
datafile = readxpcfile(data);

See Also

xPC Target file object methods get (ftp), fopen, and fread.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS