We present MATLAB codes for algorithms described in the paper: "Linear-time CUR approximation of BEM matrices" Journal of Computational and Applied Mathematics. By Alan Ayala, Xavier Claeys and Laura Grigori.
Corresponds to Algorithm 2 in the paper: CUR via Geometric sampling.
Sampling columns using Gravity centers approach.
Sampling columns using Nearest-Neighbors approach.