Home > classes > @ao > le.m

le

PURPOSE ^

LE overloads <= operator for analysis objects. Compare the y-axis values.

SYNOPSIS ^

function a = le(b, c, varargin)

DESCRIPTION ^

 LE overloads <= operator for analysis objects. Compare the y-axis values.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: LE 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: le.html,v 1.14 2008/03/31 10:27:33 hewitson Exp $

 HISTORY: 06-02-2007 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function a = le(b, c, varargin)
0002 % LE overloads <= operator for analysis objects. Compare the y-axis values.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: LE 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: le.html,v 1.14 2008/03/31 10:27:33 hewitson Exp $
0015 %
0016 % HISTORY: 06-02-2007 M Hewitson
0017 %             Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 VERSION = '$Id: le.html,v 1.14 2008/03/31 10:27:33 hewitson 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. The value is not necessary.
0042 %  It is only necessary that the value is set.
0043 pl = plist(param('ydata', 'x_xx_y'));
0044 
0045 %% Get the data from analysis object
0046 [dummy, x] = get_xy_values(b.data, pl);
0047 
0048 %% Get data from second input
0049 if isa(c, 'ao')
0050   [dummy, y] = get_xy_values(c.data, pl);
0051 else
0052   y = c*ones(size(x));
0053 end
0054 
0055 %% Create Output
0056 a = x<=y;
0057 
0058 % END

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003