Add Expr3 in Phase Transitions in FAR using CS

This commit is contained in:
Ksyer
2024-01-27 20:57:17 +08:00
parent ebfe01bddf
commit 4f5877a3fd
3 changed files with 11 additions and 7 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
% Expr2.m to draw Fig 3(a) % Expr3.m to draw Fig 3(a)
clc; clc;
clear; clear;
@@ -8,7 +8,7 @@ epi = 0.02; % \Delta f / f_c = 0.02
beta = 1; beta = 1;
max_n = 125; max_n = 125;
max_k = 25; max_k = 3;
trials_time = 5; trials_time = 5;
eps = 1e-5; eps = 1e-5;
@@ -33,7 +33,7 @@ end
for n = 1:max_n for n = 1:max_n
parfor k = 1:max_k for k = 1:max_k
s = beta * k * M; s = beta * k * M;
x = 0; x = 0;
Binary file not shown.
@@ -13,13 +13,17 @@ function flg = Expr3_can_recovery(Phi_far, N, M, n, s, eps)
y = Phi * sparse_signal(:); y = Phi * sparse_signal(:);
cvx_begin quiet cvx_begin quiet
variable x(M * N) complex variable x(M, N) complex
minimize(norm(x, 1)) norm21 = 0;
for i = 1:N
norm21 = norm21 + norm(x(:, i));
end
minimize(norm21)
subject to subject to
Phi * x == y Phi * x(:) == y
cvx_end cvx_end
p = norm(x - sparse_signal(:), 2); p = norm(x(:) - sparse_signal(:), 2);
if p < eps if p < eps
flg = 1; flg = 1;