NE overloads the ~= operator for pole objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: NE overloads the ~= operator for pole objects. CALL: result = ne(p1,p2) result = ne(p1,p2, 'property1', 'property2') result = ne(p1,p2, 'class/property', 'class/property') result = ne(p1,p2, plist('Exceptions', 'exception-list')) PLIST: key: 'Exceptions' value: String or cell-array with exceptions. INPUTS: p1,p2 - input pole objects OUTPUTS: If the two pole objects are considered equal, result == 0, otherwise, result == 1. VERSION: $Id: ne.html,v 1.12 2008/03/31 10:27:38 hewitson Exp $ HISTORY: 29-08-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function result = ne(p1, p2 , varargin) 0002 % NE overloads the ~= operator for pole objects. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: NE overloads the ~= operator for pole objects. 0007 % 0008 % CALL: result = ne(p1,p2) 0009 % result = ne(p1,p2, 'property1', 'property2') 0010 % result = ne(p1,p2, 'class/property', 'class/property') 0011 % result = ne(p1,p2, plist('Exceptions', 'exception-list')) 0012 % 0013 % PLIST: key: 'Exceptions' 0014 % value: String or cell-array with exceptions. 0015 % 0016 % INPUTS: p1,p2 - input pole objects 0017 % 0018 % OUTPUTS: If the two pole objects are considered equal, result == 0, 0019 % otherwise, result == 1. 0020 % 0021 % VERSION: $Id: ne.html,v 1.12 2008/03/31 10:27:38 hewitson Exp $ 0022 % 0023 % HISTORY: 29-08-2007 M Hewitson 0024 % Creation 0025 % 0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0027 0028 VERSION = '$Id: ne.html,v 1.12 2008/03/31 10:27:38 hewitson Exp $'; 0029 CATEGORY = 'Relational Operator'; 0030 0031 % Check if this is a call for parameters 0032 if nargin == 2 0033 if isa(p1, 'pole') && ischar(p2) 0034 in = char(p2); 0035 if strcmp(in, 'Params') 0036 result = plist(); 0037 return 0038 elseif strcmp(in, 'Version') 0039 result = VERSION; 0040 return 0041 elseif strcmp(in, 'Category') 0042 result = CATEGORY; 0043 return 0044 end 0045 end 0046 end 0047 0048 if eq(p1, p2, varargin{:}) 0049 result = 0; 0050 else 0051 result = 1; 0052 end 0053 0054 % END