Mercurial > hg > ltpda
view m-toolbox/classes/@pest/setCorr.m @ 2:18e956c96a1b database-connection-manager
Add LTPDADatabaseConnectionManager implementation. Matlab code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Sun, 04 Dec 2011 21:23:09 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% SETCORR Set the property 'corr' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: SETCORR Set the property 'corr' % % CALL: obj = obj.setCorr([1:12]); % obj = obj.setCorr(plist('corr', [1:12])); % obj.setCorr([1:12]); % % INPUTS: obj - can be a vector, matrix, list, or a mix of them. % pl - to set the 'corr' with a plist specify only one plist with % only one key-word 'corr'. % % <a href="matlab:utils.helper.displayMethodInfo('pest', 'setCorr')">Parameters Description</a> % % VERSION: $Id: setCorr.m,v 1.9 2011/04/08 08:56:25 hewitson Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function varargout = setCorr(varargin) %%% Check if this is a call for parameters if utils.helper.isinfocall(varargin{:}) varargout{1} = getInfo(varargin{3}); return end prop = 'corr'; % Collect input variable names in_names = cell(size(varargin)); for ii = 1:nargin,in_names{ii} = inputname(ii);end import utils.const.* utils.helper.msg(msg.PROC3, 'running %s/%s', mfilename('class'), mfilename); % Check if this is a call from a class method callerIsMethod = utils.helper.callerIsMethod; if nargout >= 1 out = genericSet(varargin{:}, prop, in_names, callerIsMethod); else genericSet(varargin{:}, prop, in_names, callerIsMethod); out = varargin{1}; end % Set output if nargout == numel(out) % List of outputs for ii = 1:numel(out) varargout{ii} = out(ii); end else % Single output varargout{1} = out; end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Local Functions % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % FUNCTION: getInfo % % DESCRIPTION: Get Info Object % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function ii = getInfo(varargin) if nargin == 1 && strcmpi(varargin{1}, 'None') sets = {}; pl = []; else sets = {'Default'}; pl = getDefaultPlist; end % Build info object ii = minfo(mfilename, 'pest', 'ltpda', utils.const.categories.helper, '$Id: setCorr.m,v 1.9 2011/04/08 08:56:25 hewitson Exp $', sets, pl); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % FUNCTION: getDefaultPlist % % DESCRIPTION: Get Default Plist % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function plout = getDefaultPlist() persistent pl; if exist('pl', 'var')==0 || isempty(pl) pl = buildplist(); end plout = pl; end function plo = buildplist() plo = plist({'corr', 'Correlation matrix of the parameters for the parameter estimate (pest) object.'}, []); end