?? choosenodes.m
字號:
function Ind=ChooseNodes(Node,Element,E,N);
%ChooseNodes Lets you to choose an inhomogeneity (a set of nodes) for 2D EIT simulations
% Function Ind=ChooseNodes(Node,Element,E,N);
% lets you choose N elements from a mesh
% defined by Node and Element. If N is not given, as many
% elements as you want are chosen.
%
% 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 elements
Nod=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 on
if nargin==4
Ind=zeros(N,1);
for ii=1:N
[x,y]=ginput(1);
Ind(ii)=dsearch(Nod(:,1),Nod(:,2),Topol,x,y);
plot(Nod(Ind(ii),1),Nod(Ind(ii),2),'*')
end
else
Ind=[];
[x,y]=ginput;
Ind=[Ind;dsearch(Nod(:,1),Nod(:,2),Topol,x,y)];
for ii=1:max(size(Ind))
plot(Nod(Ind(ii),1),Nod(Ind(ii),2),'*')
end
end
%Ind=dsearch(Nod(:,1),Nod(:,2),Topol,x,y);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -