eq.m
上传用户:haiyisale
上传日期:2013-01-09
资源大小:3246k
文件大小:1k
- function R = eq(A,B)
- %EQ Laurent polynomials equality test.
- % EQ(A,B) returns 1 if the two Laurent polynomials A and B
- % are equal and 0 otherwise.
- % M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 20-Mar-2001.
- % Last Revision 13-Jun-2003.
- % Copyright 1995-2004 The MathWorks, Inc.
- % $Revision: 1.1.6.2 $ $Date: 2004/04/13 00:38:38 $
- if isnumeric(A) && length(A)==1 , A = laurpoly(A,0);
- elseif isnumeric(B) && length(B)==1 , B = laurpoly(B,0);
- end
- epsilon = 1E-9;
- if ((A.maxDEG-B.maxDEG)==0) && (length(A.coefs)==length(B.coefs))
- R = max(abs(A.coefs-B.coefs))<epsilon;
- else
- R = false;
- end