
SIGNAL/RTS APPLICATION NOTES
2 Application Note 11
Transferring Data between SIGNAL and MATLAB
Following is a discussion of the SIGNAL and MATLAB commands used to exchange data
files between the two programs. Note that SIGNAL files can be stored in two data formats -
integer or floating point - and two header formats - SIGNAL file header or headerless. See
the chapter "File Storage and Exchange" in the SIGNAL User Guide for background. The
basic strategies for file exchange are: 1) export data from SIGNAL in SIGNAL-header files
and let MATLAB skip over the SIGNAL header and 2) export data from MATLAB in
headerless files, supplying the essential file parameters when importing into SIGNAL.
Exporting integer SIGNAL time files to MATLAB
SIGNAL time buffers which have not been manipulated after acquisition can be transferred
without loss of precision by using integer format, which stores the exact values delivered by
the A/D converter.
SIGNAL-header integer files
SIGNAL-header integer files are read in MATLAB by skipping the header and applying a
data conversion factor.
1. Write the SIGNAL time buffer to a SIGNAL-header integer time file using the /I flag:
>W T 1 /I
Filename: IFILE
2. Read the file into a MATLAB array. The following MATLAB commands will read the
entire integer file IFILE into the array A. FSEEK skips the 1024-byte SIGNAL file header.
fid = fopen ('ifile','rb');
fseek(fid,1024,'bof');
A = fread (fid,inf,'int16');
3. SIGNAL-header integer files are stored in the native coding of the A/D converter (unlike
headerless integer files - see below). 12-bit SIGNAL A/D boards produce data with an offset
of 2048 and a gain of 2048 bits/10 Volts, while 16-bit SIGNAL A/D boards deliver an offset
of 0 and a gain of 32768 bits/10 Volts. See "Import / Export of Binary Files" in the SIGNAL
User Guide. These conversion factors are used to convert the file data to Volts after
importing into MATLAB:
A = (A - 2048.) / 204.8; 12-bit A/D
A = A / 3276.8; 16-bit A/D
Comentarios a estos manuales