-
Notifications
You must be signed in to change notification settings - Fork 0
/
back_fft32inverse_y512.m
95 lines (82 loc) · 3.27 KB
/
back_fft32inverse_y512.m
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
function result = back_fft32inverse_y512(FN00, FN01, FN02, FN03, FN04, FN05, FN06, FN07, FN08, FN09, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, FN20, FN21, FN22, FN23, FN24, FN25, FN26, FN27, FN28, FN29, FN30, FN31)
% Input: FFT_Inverse_32 (32x32 matrix)
% Output: f=a0+a1y+...+a_511y^511 (array of 512)
% NOTE: We must convert R[y,w]/(y^16-w, w^32-1) to R[y]/(y^512-1)
%(a0+...+a_16y^16)
% | A0 | ( A1 )w | w^0
% | B0 | ( B1 )w | w^1
% | C0 | ( C1 )w | w^2
% | D0 | ( D1 )w | w^3
% | E0 | ( E1 )w | w^4
% | F0 | ( F1 )w | w^5
% ...
% Convert to
% (A0+Z1) + (A1+B0)w + (B1+C0)w^2 + (C1+D0)w^3 + ... + ()w^31 where
% AX+BY is of the form a0+a1y+...+a_15y^15
array_w00 = mod(FN31([17:32])+FN00([1:16]),2048);
array_w01 = mod(FN00([17:32])+FN01([1:16]),2048);
array_w02 = mod(FN01([17:32])+FN02([1:16]),2048);
array_w03 = mod(FN02([17:32])+FN03([1:16]),2048);
array_w04 = mod(FN03([17:32])+FN04([1:16]),2048);
array_w05 = mod(FN04([17:32])+FN05([1:16]),2048);
array_w06 = mod(FN05([17:32])+FN06([1:16]),2048);
array_w07 = mod(FN06([17:32])+FN07([1:16]),2048);
array_w08 = mod(FN07([17:32])+FN08([1:16]),2048);
array_w09 = mod(FN08([17:32])+FN09([1:16]),2048);
array_w10 = mod(FN09([17:32])+FN10([1:16]),2048);
array_w11 = mod(FN10([17:32])+FN11([1:16]),2048);
array_w12 = mod(FN11([17:32])+FN12([1:16]),2048);
array_w13 = mod(FN12([17:32])+FN13([1:16]),2048);
array_w14 = mod(FN13([17:32])+FN14([1:16]),2048);
array_w15 = mod(FN14([17:32])+FN15([1:16]),2048);
array_w16 = mod(FN15([17:32])+FN16([1:16]),2048);
array_w17 = mod(FN16([17:32])+FN17([1:16]),2048);
array_w18 = mod(FN17([17:32])+FN18([1:16]),2048);
array_w19 = mod(FN18([17:32])+FN19([1:16]),2048);
array_w20 = mod(FN19([17:32])+FN20([1:16]),2048);
array_w21 = mod(FN20([17:32])+FN21([1:16]),2048);
array_w22 = mod(FN21([17:32])+FN22([1:16]),2048);
array_w23 = mod(FN22([17:32])+FN23([1:16]),2048);
array_w24 = mod(FN23([17:32])+FN24([1:16]),2048);
array_w25 = mod(FN24([17:32])+FN25([1:16]),2048);
array_w26 = mod(FN25([17:32])+FN26([1:16]),2048);
array_w27 = mod(FN26([17:32])+FN27([1:16]),2048);
array_w28 = mod(FN27([17:32])+FN28([1:16]),2048);
array_w29 = mod(FN28([17:32])+FN29([1:16]),2048);
array_w30 = mod(FN29([17:32])+FN30([1:16]),2048);
array_w31 = mod(FN30([17:32])+FN31([1:16]),2048);
result = [ ...
array_w00, ...
array_w01, ...
array_w02, ...
array_w03, ...
array_w04, ...
array_w05, ...
array_w06, ...
array_w07, ...
array_w08, ...
array_w09, ...
array_w10, ...
array_w11, ...
array_w12, ...
array_w13, ...
array_w14, ...
array_w15, ...
array_w16, ...
array_w17, ...
array_w18, ...
array_w19, ...
array_w20, ...
array_w21, ...
array_w22, ...
array_w23, ...
array_w24, ...
array_w25, ...
array_w26, ...
array_w27, ...
array_w28, ...
array_w29, ...
array_w30, ...
array_w31 ...
];
end