Files
2024-07-16 15:55:23 +08:00

43 lines
662 B
Matlab
Executable File

%% 参数设置
N = 16;
M = 4;
A = get_Psi(N, M, 0);
%% 检查每一行 / 列的二范数
col_norms = zeros(N, 1);
for i = 1: N
col_norms(i) = norm(A(i, :), 2);
end
row_norms = zeros(N * M, 1);
for i = 1: N * M
row_norms(i) = norm(A(:, i), 2);
end
figure(1);
subplot(211);
plot(1: N, col_norms);
xlabel("Col");
ylabel("L2 norm of col");
title("L2 norm of cols");
subplot(212);
plot(1: N * M, row_norms);
xlabel("Row");
ylabel("L2 norm of row");
title("L2 norm of rows");
%%
AH = conj(A).';
figure(2);
result = abs(A * AH);
subplot(211);
plot(diag(result));
subplot(212);
heatmap(result);
a = sum(result(:)) - sum(diag(result));
fprintf("%f", a);