📄 compare.m
字号:
function p = compare(A,B)% compare.m Compare two quadgrid objects and return a 1 if they appear% to be the same. Call as%% p = compare(A,B)%% check the object field A, B.identity%% P.geom : Symmetry of coordinate system ('slab','cyln',etc)% P.qp : The set of discretization points% P.name : coordinate name;%% Copyright (c) by Raymond A. Adomaitis, 1998-2004if length(A.name) ~= length(B.name) warning('Different quadgrid dimensions - will compare only to first') endfor i = 1:length(A.name) p(i) = 1; if ~strcmp(A.geom{i},B.geom{i}), p(i) = 0; end if ~strcmp(A.name{i},B.name{i}), p(i) = 0; end Aqpi = A.qp{i}; Bqpi = B.qp{i}; if Aqpi(1) ~= Bqpi(1), p(i) = 0; end if Aqpi(end) ~= Bqpi(end), p(i) = 0; end if length(Aqpi) ~= length(Bqpi), p(i) = 0; end end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -