function A = set(A,field,newval,key) % set.m Set method for waferprofile class. Called as % % A = set(A,field,newval,key) % % INPUT PARAMETERS % % A : a waferprofile object % field : 'deltawaf, param, waferid, val' % newval : new value % key : key name if field = parameter (OPTIONAL) % if not specified, the entire param assocarry % is replaced with newval switch field case 'deltawaf' A.scalarfield = newval; case 'param' if nargin == 3 A.param = newval; elseif nargin == 4 A.param = setval(A.param,newval,key); end case 'val' A.scalarfield = setval(A.scalarfield,newval); case 'waferid' A.waferid = newval; otherwise warning('invalid field') end