Add (incomplete) SDA implementation, copied directly from MATLAB code for SpaSM