% ex61.m % ask for file containing list of sound files lname = input('Enter sound list file name : ','s'); % read list into memory tab = readtextfile(lname); % randomise list rtab = randomise(tab); % play out the files [nrows,ncols]=size(rtab); for i=1:nrows [y,fs,nbits] = wavread(rtab(i,:)); wavplay(y,fs); % wavplay waits for sound to end % unlike the SOUND function end;