MATLAB implementation of the Sloan algorithm for profile and wavefront reduction
Updated 14 Mar 2020

The implementation includes three functions:
• Label –MATLAB translation of FORTRAN function LABEL (Sloan, 1989) which label a graph for small profile and RMS wavefront.
• Graph –MATLAB translation of FORTRAN function GRAPH (Sloan, 1989) which form adjacency list for graph corresponding to FE mesh
• reduceProfile – Input to this function is FE mesh stored as a matrix of element nodes. Function calls the Graph and Label functions for profile reduction.

FORTRAN77 code from (Sloan, 1989) is translated into MATLAB code almost literally. No attempts for code vectorization was made. The only change in implementation is the replacement of subroutine ISORTI (using insertion sort) by straight selection sort. Also, some checks for intercepting 1x1 matrix and diagonal matrix are added.

Sloan, S. W. (1989). A Fortran Program for Profile and Wave-Front Reduction. International Journal for Numerical Methods in Engineering, 28(11), 2651-2679.

The technical note is available from

Cite As

milan batista (2024). reduceProfile (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Directed Graphs in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

Add to GitHub


Change image


Correct matrix plot


Add a link to the technical note


To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.