Mercurial > hg > ltpda
view m-toolbox/classes/@ssm/doSetParameters.m @ 46:ca0b8d4dcdb6 database-connection-manager
Fix
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 19:07:27 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% DOSETPARAMETERS Sets the values of the given parameters. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: DOSETPARAMETERS Sets the values of the given parameters. % % CALL: obj = obj.setParameters({'key1', ...}, [val1, ...]); % obj = obj.setParameters(plist); % obj = obj.setParameters('key', val); % % VERSION: $Id: doSetParameters.m,v 1.2 2011/02/22 15:41:16 hewitson Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function sys = doSetParameters(sys, setnames, setvalues) Nset = numel(setvalues); for j=1:Nset if ~any(strcmpi(setnames{j}, {sys.params.params.key})) warning(['### parameter named ' setnames{j} ' was not found in system ' sys.name]) else sys.params.pset( setnames{j}, setvalues(j) ); end end end