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=disablefield(param,paramtext,enablesthese,inbox) tomwalters@0: % the boolean parameter paramtext switches on or off the fields in tomwalters@0: % enablethese tomwalters@0: % this is the reverse of enablefield 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,paramtext,inbox); tomwalters@0: inbox=param.entries{nr}.panel; tomwalters@0: tomwalters@0: if nr>0 tomwalters@0: cval=1-param.entries{nr}.value; % disable instead of enable tomwalters@0: nre=size(enablesthese,1); tomwalters@0: if nre==1 tomwalters@0: param.entries{nr}.disables{1}=enablesthese; tomwalters@0: param.entries{nr}.disables_inbox{1}=inbox; tomwalters@0: param=enable(param,enablesthese,cval,inbox); tomwalters@0: else tomwalters@0: for i=1:nre tomwalters@0: param.entries{nr}.disables{i}=enablesthese{i}; tomwalters@0: param.entries{nr}.disables_inbox{i}=inbox; tomwalters@0: param=enable(param,enablesthese{i},cval,inbox); tomwalters@0: end tomwalters@0: end tomwalters@0: else tomwalters@0: error('setvalue::error, the entry does not exist'); tomwalters@0: end tomwalters@0: