bound1.m

来自「MATLAB二维电阻抗断层成像算法!用于医学成像,里面包括有限元剖分正问题,及反」· M 代码 · 共 29 行

M
29
字号
function int=bound1(g);

%bound1 Computes the boundary integral of one linear basis function in 2D FEM
% Function int=bound1(g) calculates the boundary integral
% of one basis function from g(1,:) to g(2,:).
%
% INPUT
%
% g = integration endpoints
%
% OUTPUT
%
% int = value of the integral



int=1/2*sqrt((g(2,1)-g(1,1))^2+(g(2,2)-g(1,2))^2); 

%w=[1/2,1/2];
%ip=[1/2-1/6*sqrt(3),1/2+1/6*sqrt(3)];
%dJt=sqrt((g(2,1)-g(1,1))^2+(g(2,2)-g(1,2))^2); 
%int=0;
% for ii=1:2
%  S=[1-ip(ii);ip(ii)];
%  int=int+w(ii)*S;
% end
%int=int*dJt;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?