tomwalters@0: % procedure for 'aim-mat' tomwalters@0: %function handles=aim_loadpersonal_defaults(handles) tomwalters@0: % INPUT VALUES: tomwalters@0: % 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_loadpersonal_defaults(handles) tomwalters@0: % loads the file 'personal_defaults' from the current directory tomwalters@0: % each personal default setting for a parameter must come in the complete tomwalters@0: % parameter format tomwalters@0: % e.g. tomwalters@0: % tomwalters@0: tomwalters@0: if exist('personal_defaults.m','file') tomwalters@0: tomwalters@0: all_options=handles.all_options; tomwalters@0: tomwalters@0: try tomwalters@0: personal_defaults; % evaluates the file and overwrites the tomwalters@0: catch tomwalters@0: disp('aim_loadpersonal_defaults: errors in reading in the personal_defaults.m'); tomwalters@0: return tomwalters@0: end tomwalters@0: % if OK, then overwrite the parameters: tomwalters@0: handles.all_options=all_options; tomwalters@0: tomwalters@0: tomwalters@0: if exist('default_module_pcp','var')==1 tomwalters@0: handles=setselection(handles,'pcp',default_module_pcp); tomwalters@0: handles.info.default_start_module_pcp=default_module_pcp; tomwalters@0: end tomwalters@0: if exist('default_module_bmm','var')==1 tomwalters@0: handles=setselection(handles,'bmm',default_module_bmm); tomwalters@0: handles.info.default_start_module_bmm=default_module_bmm; tomwalters@0: end tomwalters@0: if exist('default_module_nap','var')==1 tomwalters@0: handles=setselection(handles,'nap',default_module_nap); tomwalters@0: handles.info.default_start_module_nap=default_module_nap; tomwalters@0: end tomwalters@0: if exist('default_module_strobes','var')==1 tomwalters@0: handles=setselection(handles,'strobes',default_module_strobes); tomwalters@0: handles.info.default_start_module_strobes=default_module_strobes; tomwalters@0: end tomwalters@0: if exist('default_module_sai','var')==1 tomwalters@0: handles=setselection(handles,'sai',default_module_sai); tomwalters@0: handles.info.default_start_module_sai=default_module_sai; tomwalters@0: end tomwalters@0: if exist('default_module_usermodule','var')==1 tomwalters@0: handles=setselection(handles,'usermodule',default_module_usermodule); tomwalters@0: handles.info.default_start_module_usermodule=default_module_usermodule; tomwalters@0: end tomwalters@0: if exist('default_module_movie','var')==1 tomwalters@0: handles=setselection(handles,'pcp',default_module_pcp); tomwalters@0: handles.info.default_start_module_pcp=default_module_pcp; tomwalters@0: end tomwalters@0: if exist('default_module_pcp','var')==1 tomwalters@0: handles=setselection(handles,'movie',default_module_movie); tomwalters@0: handles.info.default_start_module_movie=default_module_movie; tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: function handles=setselection(handles,selstr,curmod) tomwalters@0: switch selstr tomwalters@0: case('pcp') tomwalters@0: hand=handles.listbox0; tomwalters@0: handles.info.current_pcp_module=curmod; tomwalters@0: case('bmm') tomwalters@0: hand=handles.listbox1; tomwalters@0: handles.info.current_bmm_module=curmod; tomwalters@0: case('nap') tomwalters@0: hand=handles.listbox2; tomwalters@0: handles.info.current_nap_module=curmod; tomwalters@0: case('strobes') tomwalters@0: hand=handles.listbox3; tomwalters@0: handles.info.current_strobes_module=curmod; tomwalters@0: case('sai') tomwalters@0: hand=handles.listbox4; tomwalters@0: handles.info.current_sai_module=curmod; tomwalters@0: case('usermodule') tomwalters@0: hand=handles.listbox6; tomwalters@0: handles.info.current_usermodule_module=curmod; tomwalters@0: case('movie') tomwalters@0: hand=handles.listbox5; tomwalters@0: handles.info.current_movie_module=curmod; tomwalters@0: end tomwalters@0: tomwalters@0: names=get(hand,'String'); tomwalters@0: for i=1:length(names) tomwalters@0: if strcmp(names{i},curmod) tomwalters@0: set(hand,'Value',i); tomwalters@0: return tomwalters@0: end tomwalters@0: end tomwalters@0: return tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: