Mercurial > hg > ltpda
view m-toolbox/classes/@minfo/setMclass.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line source
% SETMCLASS Set the property 'mclass'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: Set the property 'mclass'. % % CALL: obj.setMclass('string'); % obj = obj.setMclass('string'); % % INPUTS: obj - must be a single minfo object. % % VERSION: $Id: setMclass.m,v 1.1 2010/03/25 15:16:13 ingo Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function varargout = setMclass(varargin) obj = varargin{1}; val = varargin{2}; if ~ischar(val) error('### The value for the property ''mclass'' 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.mclass = val; varargout{1} = obj; end