Instrument Control Toolbox | ![]() ![]() |
Example: Parsing Input Data Using scanstr
This example illustrates how to use the scanstr
function to parse data that you read from a Tektronix TDS 210 oscilloscope. scanstr
is particularly useful when you want to parse a string into one or more cell array elements, where each element is determined to be either a double or a string.
g
associated with a National Instruments GPIB controller with board index 0, and an instrument with primary address 1.
g
to the oscilloscope.
fprintf(g,'*IDN?'); idn = scanstr(g) idn = 'TEKTRONIX' 'TDS 210' [ 0] 'CF:91.1CT FV:v1.16 TDS2CM:CMV:v1.04'
g
, you should disconnect it from the instrument, and remove it from memory and from the MATLAB workspace.
![]() | Example: Reading Binary Data | Example: Understanding EOI and EOS | ![]() |