5、e(product,Kin) 2.%Regularize Summary of this function goes here 3.% Detailed explanation goes here 4.% product = A'*r_n;%传感矩阵A各列与残差的内积 5.% K为稀疏度 6.% pos为选出的各列序号 7.% val为选出的各列与残差的内积值 8.% Reference:Needell D,Vershynin R. Uniform uncertainty
6、principle and 9.% signal recovery via regularized orthogonal matching pursuit. 10.% Foundations of Computational Mathematics, 2009,9(3): 317-334. 11. productabs = abs(product);%取绝对值 12. [productdes,indexproductdes] = sort(productabs,'descend
7、');%降序排列 13. for ii = length(productdes):-1:1 14. if productdes(ii)>1e-6%判断productdes中非零值个数 15. break; 16. end 17. end 18. %Identify:Choose a set J of the K biggest coordinates 19. if ii>=Kin 20. J = indexp
8、roductdes(1:Kin);%集合J 21. Jval = productdes(1:Kin);%集合J对应的序列值 22. K = Kin; 23. else%or all of its nonzero coordinates,whichever is smaller 24. J = indexproductdes(1:i