annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@miremotion/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 ee = set(e,varargin)
wolffd@0 2 % SET Set properties for the MIRemotion object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 %dim = e.dim;
wolffd@0 7 dimdata = e.dimdata;
wolffd@0 8 activity_fact = e.activity_fact;
wolffd@0 9 valence_fact = e.valence_fact;
wolffd@0 10 tension_fact = e.tension_fact;
wolffd@0 11 %classes = e.class;
wolffd@0 12 classdata = e.classdata;
wolffd@0 13 happy_fact = e.happy_fact;
wolffd@0 14 sad_fact = e.sad_fact;
wolffd@0 15 tender_fact = e.tender_fact;
wolffd@0 16 anger_fact = e.anger_fact;
wolffd@0 17 fear_fact = e.fear_fact;
wolffd@0 18 d = mirdata(e);
wolffd@0 19 d = set(d,'Title',get(e,'Title'),'Abs',get(e,'Abs'),'Ord',get(e,'Ord'));
wolffd@0 20 while length(propertyArgIn) >= 2,
wolffd@0 21 prop = propertyArgIn{1};
wolffd@0 22 val = propertyArgIn{2};
wolffd@0 23 propertyArgIn = propertyArgIn(3:end);
wolffd@0 24 switch prop
wolffd@0 25 case 'DimData'
wolffd@0 26 dimdata = val;
wolffd@0 27 case 'ClassData'
wolffd@0 28 classdata = val;
wolffd@0 29 case 'ActivityFactors'
wolffd@0 30 activity_fact = val;
wolffd@0 31 case 'ValenceFactors'
wolffd@0 32 valence_fact = val;
wolffd@0 33 case 'TensionFactors'
wolffd@0 34 tension_fact = val;
wolffd@0 35 case 'HappyFactors'
wolffd@0 36 happy_fact = val;
wolffd@0 37 case 'SadFactors'
wolffd@0 38 sad_fact = val;
wolffd@0 39 case 'TenderFactors'
wolffd@0 40 tender_fact = val;
wolffd@0 41 case 'AngerFactors'
wolffd@0 42 anger_fact = val;
wolffd@0 43 case 'FearFactors'
wolffd@0 44 fear_fact = val;
wolffd@0 45 otherwise
wolffd@0 46 d = set(d,prop,val);
wolffd@0 47 end
wolffd@0 48 end
wolffd@0 49 ee.dim = e.dim;
wolffd@0 50 ee.dimdata = dimdata;
wolffd@0 51 ee.activity_fact = activity_fact;
wolffd@0 52 ee.valence_fact = valence_fact;
wolffd@0 53 ee.tension_fact = tension_fact;
wolffd@0 54 ee.class = e.class;
wolffd@0 55 ee.classdata = classdata;
wolffd@0 56 ee.happy_fact = happy_fact;
wolffd@0 57 ee.sad_fact = sad_fact;
wolffd@0 58 ee.tender_fact = tender_fact;
wolffd@0 59 ee.anger_fact = anger_fact;
wolffd@0 60 ee.fear_fact = fear_fact;
wolffd@0 61 ee = class(ee,'miremotion',d);