annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirscalar/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 for the MIRscalar object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 m = s.mode;
wolffd@0 7 l = s.legend;
wolffd@0 8 p = s.parameter;
wolffd@0 9 d = mirdata(s);
wolffd@0 10 d = set(d,'Title',get(s,'Title'),'Abs',get(s,'Abs'),'Ord',get(s,'Ord'));
wolffd@0 11 while length(propertyArgIn) >= 2,
wolffd@0 12 prop = propertyArgIn{1};
wolffd@0 13 val = propertyArgIn{2};
wolffd@0 14 propertyArgIn = propertyArgIn(3:end);
wolffd@0 15 switch prop
wolffd@0 16 case 'Mode'
wolffd@0 17 m = val;
wolffd@0 18 case 'Legend'
wolffd@0 19 l = val;
wolffd@0 20 case 'Parameter'
wolffd@0 21 p = val;
wolffd@0 22 otherwise
wolffd@0 23 d = set(d,prop,val);
wolffd@0 24 end
wolffd@0 25 end
wolffd@0 26 ss.mode = m;
wolffd@0 27 ss.legend = l;
wolffd@0 28 ss.parameter = p;
wolffd@0 29 ss = class(ss,'mirscalar',d);