A naive implementation:
\ ¦ /
/ ¦ \
The picture above shows a node with 8 links with uniform stifness and damping coefficient.
Force on each node contributed by the the 8 links is computed, then the result is used to update the position of the node.
Further details can be found at:
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.