comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirstruct/set.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function ss = set(s,varargin)
2 % SET Set properties from the MIRstruct object and return the value
3
4 propertyArgIn = varargin;
5 f = s.fields;
6 d = s.data;
7 t = s.tmp;
8 st = s.stat;
9 des = mirdesign(s);
10 while length(propertyArgIn) >= 2,
11 prop = propertyArgIn{1};
12 val = propertyArgIn{2};
13 propertyArgIn = propertyArgIn(3:end);
14 switch prop
15 case 'Fields'
16 f = val;
17 case 'Data'
18 d = val;
19 case 'Tmp'
20 t = val;
21 case 'Stat'
22 st = val;
23 otherwise
24 des = set(des,prop,val);
25 end
26 end
27 ss.fields = f;
28 ss.data = d;
29 ss.tmp = t;
30 ss.stat = st;
31 ss = class(ss,'mirstruct',des);