% [data] = GET_SIG(fs,NS)
% Input the sampling frequency 'fs' and the number of samples to take 'NS'
% The function will output the sampled data.
% Matt Sharp, Oct. 2004

function [data] = get_sig(fs,NS)

ai=analoginput('keithley')
addchannel(ai,1)
set(ai,'SampleRate',fs)
set(ai,'SamplesPerTrigger',NS)
start(ai)

% The getdata command will get the vector of NS samples.
% The getsample command does nothing in this function!

data=getdata(ai);
point=getsample(ai);

stop(ai)
delete(ai)

