User`s guide

2 Targets and Scopes in the MATLAB Interface
2-18
sc(1).trigger;
% Start things off by triggering scope 1
data = zeros(0, 2);
t = [];
scNum = 1;
% We will look at scope 1 first
% Use some appropriate condition instead of an infinite loop
while(1)
% loop until the scope has finished
while ~strcmp(sc(scNum).Status, 'Finished'), end
data(end + 1 : end + 500, :) = sc(scNum).Data;
t( end + 1 : end + 500) = sc(scNum).Time;
start(sc(scNum));
% Restart the scope
scNum = 3 - scNum;
% Switch to the next scope
end