Files
FAR_CS/Block RIP/Phase transitions/main.m
T
2024-02-21 16:44:41 +08:00

35 lines
526 B
Matlab

clc;
clear;
N = 32;
M = 4;
k = 5;
epi = 0.02;
Psi_wide = get_Psi(N, M, epi);
max_n = 100;
max_s = 100;
trials_time = 50;
d = 5;
eps = 1e-5;
prob = zeros(max_n, max_s);
for n = 1:max_n
Psi_narrow = get_Psi(n, M, 0);
parfor s = 1:max_s
if n > s
x = 0;
for t = 1:trials_time
x = x + can_recovery(Psi_narrow, s, eps);
end
prob(n, s) = x / trials_time;
else
prob(n, s) = 0;
end
end
end
save("Expr1.mat", "prob");