clear % simple testing S-POCS reconstruction capabilities N=128; K=20; x=[rand(1,K) zeros(1,N-K)]'; x=x(randperm(128)); m=floor(3.5*K); Phi=randn(m,N)/sqrt(m);aPhi=Phi'; y=Phi*x; figure; plot(x); nx=cspocs_K(Phi,aPhi,K,y,10000); % Tolerance reached. Stop at n=90 % Final score: ||y - Phi*xest|| = 8.321048e-11 hold on; plot(nx,'ro');