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