tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % handles: tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % bleeck@3: % tomwalters@0: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: bleeck@3: tomwalters@0: tomwalters@0: tomwalters@0: function handles=aim_deletefile(handles,type) tomwalters@0: % deletes the file, if it is there tomwalters@0: tomwalters@0: switch type tomwalters@0: case 'bmm' tomwalters@0: todelete=handles.info.bmmname; tomwalters@0: handles.info.bmm_loaded=0; tomwalters@0: case 'nap' tomwalters@0: todelete=handles.info.napname; tomwalters@0: handles.info.nap_loaded=0; tomwalters@0: case 'strobes' tomwalters@0: todelete=handles.info.strobesname; tomwalters@0: handles.info.strobes_loaded=0; tomwalters@0: case 'sai' tomwalters@0: todelete=handles.info.sainame; tomwalters@0: handles.info.sai_loaded=0; tomwalters@0: case 'pitch_image' tomwalters@0: todelete=handles.info.pitch_imagename; tomwalters@0: handles.info.pitch_image_loaded=0; tomwalters@0: case 'usermodule' tomwalters@0: todelete=handles.info.usermodulename; tomwalters@0: handles.info.usermodule_loaded=0; tomwalters@0: case 'movie' tomwalters@0: handles.info.movie_loaded=0; tomwalters@0: mnames=handles.info.moviename; tomwalters@0: for i=1:length(mnames) tomwalters@0: todelete=handles.info.moviename{i}; tomwalters@0: if ~fexist(todelete) tomwalters@0: return tomwalters@0: end tomwalters@0: delete(todelete); tomwalters@0: end tomwalters@0: return tomwalters@0: %otherwise tomwalters@0: % todelete=''; % Stops it crashing if given junk, left out as this tomwalters@0: % is a good indicator that there's something wrong. tomwalters@0: end tomwalters@0: tomwalters@0: if ~fexist(todelete) tomwalters@0: return tomwalters@0: end tomwalters@0: tomwalters@0: delete(todelete);