Matlab code for the accelerated primal-dual method (APD)