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