TRUSS2D
Uses the Finite Element Method to calculate a plane truss with small displacements and linear material. Reads an input file that contains geometry and member information, as well as loads and nodal displacements. The outputs are nodal displacements and forces, deformed coordinates and member axial loads. The 1st plot is a superposition of the deformed truss over the original, while the 2nd indicates wheter a member is in traction (blue), compression (red) or is not being loaded (black). Working to improve plot quality and include a stability check according to AISC 89. Can be easily modified to accept a 3D truss. The requested scale factor scales the deformed plot by the amount inputed.
This code is a major modification to Dr. R. Sevilla's Heat2D.m code, to whom I'm grateful for the lectures and code template. A sample input file (truss.dat) is included as a template and test case; in the first section, the last 2 columns are member Area and Young's Modulus. Enjoy!
Cite As
Lucas Gasparino (2026). TRUSS2D (https://www.mathworks.com/matlabcentral/fileexchange/67201-truss2d), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
