Skip to content

Instantly share code, notes, and snippets.

@turingbirds
turingbirds / moore_penrose_pseudoinverse.c
Last active June 1, 2024 16:46
Compute the (Moore-Penrose) pseudo-inverse of a libgsl matrix in plain C.
/**
* Compute the (Moore-Penrose) pseudo-inverse of a libgsl matrix in plain C.
*
* Compile uding:
*
* gcc moore_penrose_pseudoinverse.c -lgsl -lblas
*
* Dependencies:
* - libgsl (GNU Scientific Library)
* - libblas (Basic Linear Algebra Subprograms)