Daniel@0: function cc = set(c,varargin) Daniel@0: % SET Set properties for the MIRtonalcentroid object Daniel@0: % and return the updated object Daniel@0: Daniel@0: propertyArgIn = varargin; Daniel@0: d = mirdata(c); Daniel@0: d = set(d,'Title',get(c,'Title'),'Abs',get(c,'Abs'),'Ord',get(c,'Ord')); Daniel@0: while length(propertyArgIn) >= 2, Daniel@0: prop = propertyArgIn{1}; Daniel@0: val = propertyArgIn{2}; Daniel@0: propertyArgIn = propertyArgIn(3:end); Daniel@0: switch prop Daniel@0: case 'Positions' Daniel@0: d = set(d,'Data',val); Daniel@0: case 'Dimensions' Daniel@0: d = set(d,'Pos',val); Daniel@0: otherwise Daniel@0: d = set(d,prop,val); Daniel@0: end Daniel@0: end Daniel@0: cc = class(struct,'mirtonalcentroid',d);