Line | |
---|
1 | function theta=KK_phase(Pt)
|
---|
2 | len=length(Pt);
|
---|
3 | n=1: len;
|
---|
4 |
|
---|
5 | for m=1: len
|
---|
6 | q=2*m/pi*log(Pt(n)/Pt(m));
|
---|
7 | g=(m.*m-n.*n)';
|
---|
8 | lm=logical(ones([1 len]));
|
---|
9 | lm(m)=0;
|
---|
10 | Th(m)=q(lm)*(1./g(lm));
|
---|
11 | % if (m~=1)&&(m~=len)
|
---|
12 | % Th(m)=Th(m)+(Th(m-1)+Th(m+1))/2;
|
---|
13 | % end
|
---|
14 | end
|
---|
15 | % lx=2:(len-1);
|
---|
16 | % Th(lx)=Th(lx)+(Th(lx-1)+Th(lx+1))/2;
|
---|
17 |
|
---|
18 | theta=[-Th,0,fliplr(Th(2:length(Th)))];
|
---|
19 |
|
---|
20 | % m=1: len;
|
---|
21 | % q=2/pi*repmat(m,len,1)*log((Pt(n)')*(1./Pt(m)));
|
---|
22 | % g=(repmat(m.*m,len,1)-repmat((n.*n)',1,len));
|
---|
23 | % lm=~logical(diag(ones([1 len])));
|
---|
24 | % Th(m)=q(lm)*(1./g(lm));%sum for some dimension
|
---|
Note: See
TracBrowser
for help on using the repository browser.