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


function plotelem(node,elem)
% PLOTELEM shows the index of each element on the current mesh plot
%
% USAGE
%    plotelem(node,elem)
%
% INPUT 
%     node: coordinate array of all nodes
%     elem: elements 
%

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

hold on
for i=1:size(elem,1)
    mid=mean(node(elem(i,:),:));    % Compute centroids
    text(mid(1),mid(2),int2str(i));
end