Persistent homology based on Alpha complex on MATLAB
PersistentHomologyOnMATLAB
Overview
This is a naive implimetation of persistent homology calculation and visualization by persistent diagram. My implimentation is based on [1] for the reduction of boundary oparator matrix, and [2] for calculate minimum bounding sphere to yield Alpha filtration.
[1] Edelsbrunner, H., & Harer, J. L. (2022). Computational topology: an introduction. American Mathematical Society.
[2] Welzl, E. (1991). Smallest enclosing disks (balls and ellipsoids). In H. Maurer (Ed.), New Results and New Trends in Computer Science (pp. 359–370). Springer. https://doi.org/10.1007/BFb0038202
Usage
Here is an example file for short introduction.
close all; clc; clear;
% Example
dat = load("../Dat/Lorenz-chaos-dt0.001-T1000.mat");
ndata = 1e2;
data = dat.x(1000:50:(1000+ndata*50), :);
[PD, Rinfs] = get_PD_H012_from_3Ddata(data);
% Visualization
figure;
scatter3(data(:, 1), data(:, 2), data(:, 3), 'filled'); hold on
VisualizePersistentDiagram(PD, Rinfs);
Practical functions are following:
[PD, Rinfs] = get_PD_H0...(d-1)_from_dDdata(data)
This calculates persistent diagram for <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="22411487ac6f18a08d83595eb03a3d30">$p$</math-renderer>-th persistent homology groups <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="22411487ac6f18a08d83595eb03a3d30">$(p = 0,\dots, d-1)$</math-renderer>, where <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="22411487ac6f18a08d83595eb03a3d30">$d$</math-renderer> is the dimension of input data. Output PD is data points of persistent diagram for each dimensions, and Rinfs recomended dummy values to show a persistent pair at infinity.
VisualizePersistentDiagram(PD, Rinfs);
This shows plots of persistent diagram based on inputs PD and Rinfs.
Cite As
Taiki Yamada (2025). Persistent homology based on Alpha complex on MATLAB (https://github.com/codetyt/PersistentHomologyOnMATLAB/releases/tag/1.1.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
PersistentHomology/Examples
PersistentHomology/src
PersistentHomology/src/MinimumBoundingSphere
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.1.0 |
