SET sets a xydata property. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: SET sets a xydata property. CALL: c = set(c, 'name', 'my_name'); c = set(c, 'x', X); c = set(c, 'x', [1 2 3]); c = set(c, 'y', Y); c = set(c, 'y', [1 2 3]); c = set(c, 'xunits', 'sec'); c = set(c, 'yunits', 'V'); c = set(c, 'created', time()); c = set(c, 'version', 'xydata/set.m,v 1.7...'); VERSION: $Id: set.m,v 1.8 2008/02/12 15:20:33 ingo Exp $ HISTORY: 30-01-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function xy = set(xy, varargin) 0002 % SET sets a xydata property. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: SET sets a xydata property. 0007 % 0008 % CALL: c = set(c, 'name', 'my_name'); 0009 % c = set(c, 'x', X); 0010 % c = set(c, 'x', [1 2 3]); 0011 % c = set(c, 'y', Y); 0012 % c = set(c, 'y', [1 2 3]); 0013 % c = set(c, 'xunits', 'sec'); 0014 % c = set(c, 'yunits', 'V'); 0015 % c = set(c, 'created', time()); 0016 % c = set(c, 'version', 'xydata/set.m,v 1.7...'); 0017 % 0018 % VERSION: $Id: set.m,v 1.8 2008/02/12 15:20:33 ingo Exp $ 0019 % 0020 % HISTORY: 30-01-07 M Hewitson 0021 % Creation 0022 % 0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0024 0025 VERSION = '$Id: set.m,v 1.8 2008/02/12 15:20:33 ingo Exp $'; 0026 CATEGORY = 'Helper'; 0027 DEFAULT_PLIST = plist('name', '', ... 0028 'x', [], ... 0029 'y', [], ... 0030 'xunits', '', ... 0031 'yunits', '', ... 0032 'version', '', ... 0033 'created', time); 0034 0035 xy = generic_set(xy, varargin, DEFAULT_PLIST, VERSION, CATEGORY); 0036 0037 if (nargout == 0) 0038 display(xy); 0039 error('\n### No output variable!\n### Please use: %s = set(%s, ''key'', ''value'');', inputname(1), inputname(1)); 0040 end