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=setstringvalue(param,text,strvalue,inbox) tomwalters@0: %% sets the parameter value in the parameter "text" in the panel "inbox" to tomwalters@0: %% the value "strvalue" no units or anything are used tomwalters@0: tomwalters@0: if nargin<5 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}.stringvalue=strvalue; tomwalters@0: if isfield(param.entries{nr},'handle') && ishandle(param.entries{nr}.handle{1}) % and set in the gui as well tomwalters@0: hand=param.entries{nr}.handle{1}; tomwalters@0: set(hand,'String',param.entries{nr}.stringvalue); % set the string as given tomwalters@0: end tomwalters@0: return tomwalters@0: else tomwalters@0: error('setvalue::error, the entry does not exist'); tomwalters@0: end