Shape Functions for FEA

Shape or basis functions interpolate along or within a polygon. This script will derive shape functions for many shapes.

You are now following this Submission

This Script will derive Shape/Basis functions for many shapes
The gaussian weights for numerical integration (gaussian quadrature) of some shapes are also presented.
Additionally the "B" matrix for finite element is also provided for some shapes. This would be the "strain displacement matrix".
Shapes for basis functions within the script include:
  • Lines
  • Triangle (2D)
  • Quadrilateral (2D)
  • Cube
  • Tetrahedron
  • Prism/Wedge
  • Pyramid
  • Pentagon (2D)
  • Rectangular-Pentagon (3D)

Cite As

Eric Trudel (2026). Shape Functions for FEA (https://www.mathworks.com/matlabcentral/fileexchange/129889-shape-functions-for-fea), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with R2020b and later releases

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.3

Added Rectangular Pentagon with 3D wachpress coordinates.
Refined descriptions.

1.0.2

Added a description for an additional method for constructing shape functions.
The 2nd Order Prism shape function has an additional derivation method that produces better results.

1.0.1

Fixed grammar mistakes in the summary.

1.0.0