GT overloads > operator for analysis objects. Compare the y-axis values. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: GT overloads > operator for analysis objects. Compare the y-axis values. CALL: a = b>=; POSSIBLE VALUES: b: Analysis object c: Analysis object or a scalar. VERSION: $Id: gt.m,v 1.6 2008/02/25 18:04:22 ingo Exp $ HISTORY: 06-02-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function a = gt(b, c, varargin) 0002 % GT overloads > operator for analysis objects. Compare the y-axis values. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: GT overloads > operator for analysis objects. 0007 % Compare the y-axis values. 0008 % 0009 % CALL: a = b>=; 0010 % 0011 % POSSIBLE VALUES: b: Analysis object 0012 % c: Analysis object or a scalar. 0013 % 0014 % VERSION: $Id: gt.m,v 1.6 2008/02/25 18:04:22 ingo Exp $ 0015 % 0016 % HISTORY: 06-02-2007 M Hewitson 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 VERSION = '$Id: gt.m,v 1.6 2008/02/25 18:04:22 ingo Exp $'; 0022 CATEGORY = 'Relational Operator'; 0023 0024 %% Check if this is a call for parameters or for the cvs-version number 0025 if nargin == 2 0026 if isa(b, 'ao') && ischar(c) 0027 in = char(c); 0028 if strcmp(in, 'Params') 0029 a = plist(); 0030 return 0031 elseif strcmp(in, 'Version') 0032 a = VERSION; 0033 return 0034 elseif strcmp(in, 'Category') 0035 a = CATEGORY; 0036 return 0037 end 0038 end 0039 end 0040 0041 %% Create parameter list to get the y-axis values 0042 pl = plist(param('ydata', 'x_xx_y')); 0043 0044 %% Get the data from analysis object 0045 [dummy, x] = get_xy_values(b.data, pl); 0046 0047 %% Get data from second input 0048 if isa(c, 'ao') 0049 [dummy, y] = get_xy_values(c.data, pl); 0050 else 0051 y = c*ones(size(x)); 0052 end 0053 0054 %% Create Output 0055 a = x>y; 0056 0057 % END