-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathOTFS_qr_detector.m
More file actions
39 lines (32 loc) · 778 Bytes
/
Copy pathOTFS_qr_detector.m
File metadata and controls
39 lines (32 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function x = OTFS_qr_detector(H,N,M,M_mod,taps,tauM,y)
cir_H = H;
cir_y = y;
H_H = cir_H; %for test;
Q = eye(M*N);
% %% R(i,i) increasing order
% for j = M*N:-1:1 % rows
% for i = 1:j-1 % columns
% if abs(cir_H(j,i))>1e-7
% Q1 = givensR(cir_H(j,:),i,j);
% cir_H = cir_H*Q1;
% Q=Q*Q1;
% end
% end
% end
% x = OTFS_qr_sic(cir_H,cir_y);
% sum(abs(H_H-cir_H*Q')) % for test
% %% R(i,i) decreasing order
% for j =1:M*N % columns
% for i = M*N:-1:j+1
% if abs(cir_H(i,j))>1e-7
% Q1 = givensH(cir_H(:,j),j,i);
% cir_H = Q1*cir_H;
% Q=Q1*Q;
% end
% end
% end
% sum(abs(H_H-Q'*cir_H)); %for test
[Q,R] = qr(H,0);
T = Q(1:M*N,:);
x = OTFS_qr_sic(R,T'*cir_y,M_mod);
end