282 Agilent InfiniiVision 2000 X-Series Oscilloscopes User's Guide
21 Reference
 
Binary Data in MATLAB
Binary data from an InfiniiVision oscilloscope can be imported to The 
MathWorks MATLAB®. You can download the appropriate MATLAB 
functions from the Agilent Technologies web site at 
"www.agilent.com/find/2000X- Series- examples".
Agilent provides the .m files, which need to be copied into the work 
directory for MATLAB. The default work directory is C:\MATLAB7\work.
Binary Header Format
File Header There is only one file header in a binary file. The file header consists of 
the following information.
Waveform Header It is possible to store more than one waveform in the file, and each 
waveform stored will have a waveform header. When using segmented 
memory, each segment is treated as a separate waveform. The waveform 
header contains information about the type of waveform data that is 
stored following the waveform data header.
Cookie Two byte characters, AG, that indicate the file is in the Agilent Binary Data file 
format.
Version Two bytes that represent the file version.
File Size A 32-bit integer that is the number of bytes that are in the file.
Number of 
Waveforms
A 32-bit integer that is the number of waveforms that are stored in the file.
Header Size A 32-bit integer that is the number of bytes in the header.
Waveform Type A 32-bit integer that is the type of waveform stored in the file:
• 0 = Unknown.
• 1 = Normal.
• 2 = Peak Detect.
• 3 = Average.
• 4 = Not used in InfiniiVision oscilloscopes.
• 5 = Not used in InfiniiVision oscilloscopes.
• 6 = Logic.