How to examine stimulus triggers in Intan record
% step 1, read in data:
[d]=read_Intan_RHD2000_datafile('intan_171213_040628.rhd',[],'din',1,0,Inf);
% step 2, find the threshold crossing
thresh = threshold_crossings(-double(d),-0.5);
% step 3, count the threshold crossings
numel(thresh)