matlab code, original LLC_SPM