AnalogInput Data Collection
Connect pin1(Ch0 HI) and pin2(Ch0 LO) to signal of interest
% Create analog input object ai = analoginput('mcc',0); % Data will be acquired from channel 0 addchannel(ai,0); % set input range ai.Channel.InputRange = [-5 5]; % Set sample rate, then read and report it set(ai,'SampleRate',50); fs = get(ai,'SampleRate'); fprintf('sample rate %g Hz\n',fs);
start(ai); [data,t] = getdata(ai); plot(t,data); xlabel('time (sec)'); ylabel('signal (V)');
for obj=daqfind delete(obj); end clear ao ai dio obj