compare.m
来自「MDPSAS工具箱是马里兰大学开发的」· M 代码 · 共 36 行
M
36 行
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 + =
减小字号Ctrl + -
显示快捷键?