SET sets an xyzdata property. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: SET sets an xyzdata 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, 'z', Z); c = set(c, 'z', [1 2 3]); c = set(c, 'xunits', 's'); c = set(c, 'yunits', 'Hz'); c = set(c, 'zunits', 'V'); c = set(c, 'created', time()); c = set(c, 'version', 'xyzdata/set.m,v 1.7...'); VERSION: $Id: set.m,v 1.2 2008/02/12 15:20:33 ingo Exp $ HISTORY: 24-12-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function xyz = set(xyz, varargin) 0002 % SET sets an xyzdata property. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: SET sets an xyzdata 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, 'z', Z); 0014 % c = set(c, 'z', [1 2 3]); 0015 % c = set(c, 'xunits', 's'); 0016 % c = set(c, 'yunits', 'Hz'); 0017 % c = set(c, 'zunits', 'V'); 0018 % c = set(c, 'created', time()); 0019 % c = set(c, 'version', 'xyzdata/set.m,v 1.7...'); 0020 % 0021 % VERSION: $Id: set.m,v 1.2 2008/02/12 15:20:33 ingo Exp $ 0022 % 0023 % HISTORY: 24-12-07 M Hewitson 0024 % Creation 0025 % 0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0027 0028 VERSION = '$Id: set.m,v 1.2 2008/02/12 15:20:33 ingo Exp $'; 0029 CATEGORY = 'Helper'; 0030 DEFAULT_PLIST = plist('name', '', ... 0031 'x', [], ... 0032 'y', [], ... 0033 'z', [], ... 0034 'xunits', '', ... 0035 'yunits', '', ... 0036 'zunits', '', ... 0037 'version', '', ... 0038 'created', time); 0039 0040 xyz = generic_set(xyz, varargin, DEFAULT_PLIST, VERSION, CATEGORY); 0041 0042 if (nargout == 0) 0043 display(xyz); 0044 error('\n### No output variable!\n### Please use: %s = set(%s, ''key'', ''value'');', inputname(1), inputname(1)); 0045 end