diff --git a/Phase Transitions in FAR using CS/Expr1.m b/Phase Transitions in FAR using CS/Expr1.m index 2bd5a61..9bbce3a 100644 --- a/Phase Transitions in FAR using CS/Expr1.m +++ b/Phase Transitions in FAR using CS/Expr1.m @@ -1,4 +1,4 @@ -% Expr1.m to draw Fig 2(a) + max_n = 125; max_s = 35; diff --git a/Phase Transitions in FAR using CS/Lyh/捷变频相变/FAR_block_sparsity_phase1.m b/Phase Transitions in FAR using CS/Lyh/捷变频相变/FAR_block_sparsity_phase1.m index 93b8b2b..41bfa1a 100644 --- a/Phase Transitions in FAR using CS/Lyh/捷变频相变/FAR_block_sparsity_phase1.m +++ b/Phase Transitions in FAR using CS/Lyh/捷变频相变/FAR_block_sparsity_phase1.m @@ -5,10 +5,10 @@ M = 4; N = 128; %block_sparsity = 1; tol = 1e-5; -trial = 50; +trial = 20; epi = 0.02; result = zeros(N,25); -for col = 4:4:128 +for col = 4:N for block_sparsity = 10:18 success_count = 0; for loop = 1:trial diff --git a/Phase Transitions in FAR using CS/Lyh/捷变频相变/FARblockepsilon2.mat b/Phase Transitions in FAR using CS/Lyh/捷变频相变/FARblockepsilon2.mat new file mode 100644 index 0000000..e0d5c42 Binary files /dev/null and b/Phase Transitions in FAR using CS/Lyh/捷变频相变/FARblockepsilon2.mat differ diff --git a/Phase Transitions in FAR using CS/Lyh/捷变频相变_ksy/FAR_block_sparsity_phase1.m b/Phase Transitions in FAR using CS/Lyh/捷变频相变_ksy/FAR_block_sparsity_phase1.m new file mode 100644 index 0000000..ba67669 --- /dev/null +++ b/Phase Transitions in FAR using CS/Lyh/捷变频相变_ksy/FAR_block_sparsity_phase1.m @@ -0,0 +1,45 @@ +close all; +clear all; +clc; +M = 4; +N = 128; +%block_sparsity = 1; +tol = 1e-4; +trial = 20; +max_sparsity = 25; +epi = 0.02; +result = zeros(N,max_sparsity); +FAR_model = get_far_model(N, M, epi); + +for n = 60:N + for s = 10:max_sparsity + success_count = 0; + for loop = 1:trial + col_choose = randperm(N,n); + FAR_model_partial = FAR_model(col_choose,:); + + sparse_signal = zeros(M,N); + block = randperm(N,s); + sparse_signal(:,block) = exp(1i*2*pi*rand(M,s)); + + y = FAR_model_partial * sparse_signal(:); + + cvx_begin + variable x(M,N) complex + norm21 = 0; + for i = 1:N + norm21 = norm21 + norm(x(:,i)); + end + minimize(norm21) + subject to + FAR_model_partial * x(:) == y + cvx_end + + if norm(x(:)-sparse_signal(:))