tomwalters@0: % method of class @parameter tomwalters@0: % bleeck@3: % (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 tomwalters@0: function param=enable(param,text,disablevalue,inbox) tomwalters@0: % if it has a grafical representation then disable tomwalters@0: tomwalters@0: cont=param.entries; tomwalters@0: nrent=length(cont); tomwalters@0: tomwalters@0: if nargin<4 % search in all subsections tomwalters@0: inbox='all'; tomwalters@0: end tomwalters@0: tomwalters@0: nr=getentrynumberbytext(param,text,inbox); tomwalters@0: if nr>0 tomwalters@0: param.entries{nr}.enable=disablevalue; % save the value tomwalters@0: if isfield(cont{nr},'handle') && ishandle(cont{nr}.handle{1}) % and set in the gui as well tomwalters@0: hands=cont{nr}.handle; tomwalters@0: for i=1:length(hands) tomwalters@0: switch disablevalue tomwalters@0: case 1 tomwalters@0: set(hands{i},'enable','on'); tomwalters@0: case 0 tomwalters@0: set(hands{i},'enable','off'); tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: else tomwalters@0: error('setvalue::error, the entry does not exist'); tomwalters@0: end