A Unified Computational Framework for the Linear Static Analysis of 2D Structural Systems: MATLAB® Implementation of the Direct Stiffness Method for Beams, Frames, and Trusses
Abstract
This paper presents a unified MATLAB®-based solver for the linear static analysis of two-dimensional structural systems, including trusses, beams, and frames, using the Direct Stiffness Method. The implementation formulates element stiffness matrices in local coordinates and applies systematic coordinate transformations to assemble the global stiffness matrix while enforcing equilibrium and compatibility conditions. The solver supports both truss analysis, considering axial deformation only, and beam/frame analysis, incorporating axial, bending, and rotational degrees of freedom. Concentrated joint loads and uniformly distributed member loads are accommodated, with distributed loads automatically converted into equivalent nodal forces. Boundary conditions representing fixed, pinned, and roller supports are applied through matrix partitioning. In addition to computing global joint displacements and support reactions, the solver evaluates internal axial member forces for truss elements. The code is designed with a modular structure to promote clarity, extensibility, and reproducibility, making it suitable for educational use, verification studies, and preliminary structural analysis. The paper includes three illustrative applications (a beam, a frame, and a truss) to demonstrate the formulation, usage, and accuracy of the solver. The associated MATLAB source code is released as open-source to support transparent verification and further development.
Fields of Study & Subjects
Engineering Applied Research
Structural Analysis and Optimization
Advanced Numerical Methods in Computational Mathematics
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 12 January 2026
- Language
- EN
- Document type
- Preprint