annotate 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
rev   line source
wolffd@0 1 function ss = set(s,varargin)
wolffd@0 2 % SET Set properties from the MIRstruct object and return the value
wolffd@0 3
wolffd@0 4 propertyArgIn = varargin;
wolffd@0 5 f = s.fields;
wolffd@0 6 d = s.data;
wolffd@0 7 t = s.tmp;
wolffd@0 8 st = s.stat;
wolffd@0 9 des = mirdesign(s);
wolffd@0 10 while length(propertyArgIn) >= 2,
wolffd@0 11 prop = propertyArgIn{1};
wolffd@0 12 val = propertyArgIn{2};
wolffd@0 13 propertyArgIn = propertyArgIn(3:end);
wolffd@0 14 switch prop
wolffd@0 15 case 'Fields'
wolffd@0 16 f = val;
wolffd@0 17 case 'Data'
wolffd@0 18 d = val;
wolffd@0 19 case 'Tmp'
wolffd@0 20 t = val;
wolffd@0 21 case 'Stat'
wolffd@0 22 st = val;
wolffd@0 23 otherwise
wolffd@0 24 des = set(des,prop,val);
wolffd@0 25 end
wolffd@0 26 end
wolffd@0 27 ss.fields = f;
wolffd@0 28 ss.data = d;
wolffd@0 29 ss.tmp = t;
wolffd@0 30 ss.stat = st;
wolffd@0 31 ss = class(ss,'mirstruct',des);