# how can I find coherence of a measurement matrix?

1 view (last 30 days)
Anthony Uwaechia on 8 Feb 2016
Edited: Anthony Uwaechia on 8 Jul 2016
coherence =A
Stephen23 on 8 Feb 2016
@Anthony Uwaechia: You might like to accept John's Answer, if it solved your problem.

John BG on 8 Feb 2016
Edited: John BG on 8 Feb 2016
Hi Anthony
have a look:
P=16
N =512
L=50
M=16
d=floor(N/L)
for k=1:1:d
P=ones(1,M)+d*[0:1:M-1] % you may want this line outside the main for loop
P2=Pk
for m=1:1:M
% [k k+d k+2d .. =<N]
% k=1 [1 1+d 1+2d .. =<512] = [1 11 21 31 .. 501 511]
% k=2 [2 2+d 2+2d .. =<512] = [2 12 22 32 .. 502 512]
% k=3 [3 3+d 3+2d .. =<512] = [3 13 23 33 .. 503]
% ..
% k*ones(1,floor((N-k)/d)+1) + [0 d 2d .. =<(N-k)]
n_range=k*ones(1,floor((N-k)/d)+1) + d*[0:1:floor((N-k)/d)]
for n=n_range
if (sum(ismember(n,Pk))==0)
% change Pk upper limit from (M-1)*d-1 to (n-1)*d-1 and redefine P2
P3=ones(1,n)+d*[0:1:n-1] % you may want this line outside the main for loop
if cov(P3)<cov(P2)
% or C is Carrier2Noise ratio and Ci(P2)<Ci(Pk) means all P2 carriers below Pk carriers
% then perhaps if max(P3)<min(Pk) ..
Pk=P3
end
end
end
% repeatition % for m=[M:-1:1] % % end
end
end
2 things :
1.- when Pk is generated again with n instead of M as upper limit, either the comment expression circled should be [1,2, ... Pm] or it means replace the initial elements, leaving the upper ones, whatever left as initially defined
2.- Without further information, C() may mean covariance cov() or it's Carrier2Noise ratio and Ci(P2)<Ci(Pk) means all P2 carriers are below Pk carriers, only then replace
Are you using this loop to generate OFDM (ADSL, DVB-T, WAN, ..) carrier indices?
Just for the time taken, if the lines above are of any help, would you click on the thumbs-up vote above? thanks in advance
John

### Categories

Find more on PHY Components in Help Center and File Exchange

### Tags

No tags entered yet.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!