www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CompareTwoNumericMatricesExample.m

    %% Compare Two Numeric Matrices  

%% 
% Create two numeric matrices and compare them for equality. 
A = zeros(3,3)+1e-20;
B = zeros(3,3);
tf = isequal(A,B) 

%%
% The function returns logical |0| (|false|) because the matrices differ
% by a very small amount and are not _exactly_ equal.