matlab code of the paper