Mercurial > hg > ltpda
comparison m-toolbox/classes/@param/setKeyVal.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % SETKEYVAL Set the properties 'key' and 'val' | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: Set the properties 'key' and 'val' | |
5 % | |
6 % CALL: obj.setKeyVal('new key', 'new val'); | |
7 % obj = setKeyVal(obj, 'new key', 'new val'); | |
8 % | |
9 % VERSION: $Id: setKeyVal.m,v 1.8 2011/02/18 16:48:53 ingo Exp $ | |
10 % | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 | |
13 function varargout = setKeyVal(varargin) | |
14 | |
15 %%% decide whether we modify the first plist, or create a new one. | |
16 varargin{1} = copy(varargin{1}, nargout); | |
17 | |
18 varargin{1}.key = varargin{2}; | |
19 varargin{1}.val = varargin{3}; | |
20 varargout{1} = varargin{1}; | |
21 | |
22 end | |
23 |