Hi, I'm doing my research on recovering spectrum. For that i'm proposing an algorithm which is much like Block Orthogonal Matching pursuit(BOMP). But the problem I'm facing is that I want my algorithm to detect the difference b/w indices of vector and stop the loop if the difference is greater than set threshold? To achieve that I'm doing this, which isn't right. A=100*100 matrix and r is 100*1 matrix.
xt=A*r;x=find(xt>(max(abs(xt))-threshold));for j=2:1:length(x) xdiff(j)=x(j)-x(j-1)<Other_threshold; break;end
Thanks;
WN
Best Answer