www.pudn.com > AFEM@matlab.rar > findedge.m, change:2006-10-20,size:485b


function findedge(node,edge,i)
% FINDEDGE highlights the i-th edge
%
% USAGE
%    findedge(node,edge,i)
%
% INPUT 
%     node: coordinate array of all nodes
%     edge: edges 
%     i:    index of the edge you want to highlight
%

% L. Chen & C. Zhang 10-11-2006

hold on
mid=mean(node(edge(i,:),:));    % Compute centroids
text(mid(1)-0.05,mid(2),int2str(i));
plot([node(edge(i,1),1),node(edge(i,2),1)], ...
     [node(edge(i,1),2),node(edge(i,2),2)], ...
     'b-', 'LineWidth',3.2);