diff --git a/Phase Transitions in FAR using CS/Expr3.m b/Phase Transitions in FAR using CS/Expr3.m index 83f6371..0e33d50 100644 --- a/Phase Transitions in FAR using CS/Expr3.m +++ b/Phase Transitions in FAR using CS/Expr3.m @@ -1,4 +1,4 @@ -% Expr2.m to draw Fig 3(a) +% Expr3.m to draw Fig 3(a) clc; clear; @@ -8,7 +8,7 @@ epi = 0.02; % \Delta f / f_c = 0.02 beta = 1; max_n = 125; -max_k = 25; +max_k = 3; trials_time = 5; eps = 1e-5; @@ -33,7 +33,7 @@ end for n = 1:max_n - parfor k = 1:max_k + for k = 1:max_k s = beta * k * M; x = 0; diff --git a/Phase Transitions in FAR using CS/Expr3.mat b/Phase Transitions in FAR using CS/Expr3.mat index b9e7934..868ac87 100644 Binary files a/Phase Transitions in FAR using CS/Expr3.mat and b/Phase Transitions in FAR using CS/Expr3.mat differ diff --git a/Phase Transitions in FAR using CS/Expr3_can_recovery.m b/Phase Transitions in FAR using CS/Expr3_can_recovery.m index 53ee087..b99c0af 100644 --- a/Phase Transitions in FAR using CS/Expr3_can_recovery.m +++ b/Phase Transitions in FAR using CS/Expr3_can_recovery.m @@ -13,13 +13,17 @@ function flg = Expr3_can_recovery(Phi_far, N, M, n, s, eps) y = Phi * sparse_signal(:); cvx_begin quiet - variable x(M * N) complex - minimize(norm(x, 1)) + variable x(M, N) complex + norm21 = 0; + for i = 1:N + norm21 = norm21 + norm(x(:, i)); + end + minimize(norm21) subject to - Phi * x == y + Phi * x(:) == y cvx_end - p = norm(x - sparse_signal(:), 2); + p = norm(x(:) - sparse_signal(:), 2); if p < eps flg = 1;