% script sound_in.m % gets a data array from the microphone % initialized by init_sound.m % used in URI's EGR106 % nogo=0; while not(nogo) disp('speak now... '); start(ai) try data = getdata(ai); nogo=1; catch disp('10 seconds elapsed... try again!'); stop(ai); end end