⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chooseelements.m

📁 MATLAB二维电阻抗断层成像算法!用于医学成像,里面包括有限元剖分正问题,及反问题的算法.并且附有网络剖分数据表!
💻 M
字号:
function Ind=ChooseElements(Node,Element,E,N);%ChooseElements Lets you to choose an inhomogeneity (a set of elements) for 2D EIT simulations% Function Ind=ChooseElemenst(Node,Element,E,N);% lets you choose N elements from a mesh defined by Element.If N is not given, as many% elements as you want are chosen. Ind are the indices to the Element topolgy.%% INPUT% Node = node information% Element = element information% E = electrode information (elements under the electrodes, optional, use [] if not defined)% N = the number of elements to be chosen (optional)%% OUTPUT% Ind = Indices of the chosen elementsNod=reshape([Node.Coordinate]',2,max(size(Node)))'; %剖分节点坐标Topol=reshape([Element.Topology]',size(Element(1).Topology,2),max(size(Element)))';%剖分拓朴结构clf,plcigrid(Nod,Topol,E,'r'),axis equal;          %图示剖分hold onif nargin==4      %如果有确定的单元指定个数6 Ind=zeros(N,1); for ii=1:N  [x,y]=ginput(1);    %指定单元   Ind(ii)=tsearch(Nod(:,1),Nod(:,2),Topol,x,y);  Hii=Nod(Topol(Ind(ii),:),:);  patch(Hii(:,1),Hii(:,2),1);             endelse  Ind=[];  [x,y]=ginput;  Ind=[Ind;tsearch(Nod(:,1),Nod(:,2),Topol,x,y)]; for ii=1:max(size(Ind))  Hii=Nod(Topol(Ind(ii),:),:);  patch(Hii(:,1),Hii(:,2),1);            endend

⌨️ 快捷键说明

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