comment">%------------------------------------------------------------------</span>
        <span class="comment">% Compute shape centroid.</span>
        <span class="keyword">function</span> Xc = computeCentroid(~,NODE)
            x = NODE(1:3,1);
            y = NODE(1:3,2);
            polyin = polyshape({x},{y});
            [xc,yc] = centroid(polyin);
            Xc = [xc yc];
        <span class="keyword">end</span>

        <span class="comment">%----------------------------------------------------