Mercurial > hg > camir-ismir2012
annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirstruct/set.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
rev | line source |
---|---|
Daniel@0 | 1 function ss = set(s,varargin) |
Daniel@0 | 2 % SET Set properties from the MIRstruct object and return the value |
Daniel@0 | 3 |
Daniel@0 | 4 propertyArgIn = varargin; |
Daniel@0 | 5 f = s.fields; |
Daniel@0 | 6 d = s.data; |
Daniel@0 | 7 t = s.tmp; |
Daniel@0 | 8 st = s.stat; |
Daniel@0 | 9 des = mirdesign(s); |
Daniel@0 | 10 while length(propertyArgIn) >= 2, |
Daniel@0 | 11 prop = propertyArgIn{1}; |
Daniel@0 | 12 val = propertyArgIn{2}; |
Daniel@0 | 13 propertyArgIn = propertyArgIn(3:end); |
Daniel@0 | 14 switch prop |
Daniel@0 | 15 case 'Fields' |
Daniel@0 | 16 f = val; |
Daniel@0 | 17 case 'Data' |
Daniel@0 | 18 d = val; |
Daniel@0 | 19 case 'Tmp' |
Daniel@0 | 20 t = val; |
Daniel@0 | 21 case 'Stat' |
Daniel@0 | 22 st = val; |
Daniel@0 | 23 otherwise |
Daniel@0 | 24 des = set(des,prop,val); |
Daniel@0 | 25 end |
Daniel@0 | 26 end |
Daniel@0 | 27 ss.fields = f; |
Daniel@0 | 28 ss.data = d; |
Daniel@0 | 29 ss.tmp = t; |
Daniel@0 | 30 ss.stat = st; |
Daniel@0 | 31 ss = class(ss,'mirstruct',des); |