MATLAB: Use of coordinates to plot a figure as shown

coordinatesdraw linesfigureplotshape

I am trying to make a plot of some coordinates that represent each node in the system and get the lines drawn as shown in the figure. Making a plot for the coordinates is no problem, writing a script that can make the lines, im clueless.
Thank you

Best Answer

The gplot function is probably the easiest way to do this:
xy = NodeCoordinates;
ee = ElementNodes;
n = size(xy,1);
adj = sparse(ee(:,1), ee(:,2), ones(size(ee,1),1), n,n);
gplot(adj, xy);
hold on;
plot(xy(:,1), xy(:,2), 'k.');
Related Question