EQ overloads the == operator for mfir objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: EQ overloads the == operator for mfir objects. Checks that the coefficients, the sample rate, and the gain are the same. CALL: result = eq(t1,t2) INPUTS: f1,f2 - input mfir objects OUTPUTS: If the two mfir objects are considered equal, result == 1, otherwise, result == 0. VERSION: $Id: param.m,v 1.7 2007/08/17 11:22:11 ingo Exp $ HISTORY: 29-08-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function result = eq(f1,f2) 0002 0003 % EQ overloads the == operator for mfir objects. 0004 % 0005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0006 % 0007 % DESCRIPTION: EQ overloads the == operator for mfir objects. 0008 % 0009 % Checks that the coefficients, the sample rate, and the gain 0010 % are the same. 0011 % 0012 % CALL: result = eq(t1,t2) 0013 % 0014 % INPUTS: f1,f2 - input mfir objects 0015 % 0016 % OUTPUTS: If the two mfir objects are considered equal, result == 1, 0017 % otherwise, result == 0. 0018 % 0019 % VERSION: $Id: param.m,v 1.7 2007/08/17 11:22:11 ingo Exp $ 0020 % 0021 % HISTORY: 29-08-2007 M Hewitson 0022 % Creation 0023 % 0024 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0025 0026 % Assume they are equal 0027 result = 1; 0028 0029 %% Check coefficients 0030 if f1.a ~= f2.a 0031 result = 0; 0032 return 0033 end 0034 0035 %% Check gain 0036 if f1.g ~= f2.g 0037 result = 0; 0038 return 0039 end 0040 0041 %% Check sample rate 0042 if f1.fs ~= f2.fs 0043 result = 0; 0044 return 0045 end