Mercurial > hg > ltpda
view m-toolbox/classes/@minfo/setMpackage.m @ 44:409a22968d5e default
Add unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 18:42:11 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% SETMPACKAGE Set the property 'mpackage'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: Set the property 'mpackage'. % % CALL: obj.setMpackage('string'); % obj = obj.setMpackage('string'); % % INPUTS: obj - must be a single minfo object. % % VERSION: $Id: setMpackage.m,v 1.1 2011/04/17 09:21:29 hewitson Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function varargout = setMpackage(varargin) obj = varargin{1}; val = varargin{2}; if ~ischar(val) error('### The value for the property ''mpackage'' must be a string but it is from the class [%s]!', class(val)); end %%% decide whether we modify the minfo-object, or create a new one. obj = copy(obj, nargout); %%% set 'mclass' obj.mpackage = val; varargout{1} = obj; end