Add Analyse_of_Psi
This commit is contained in:
Executable
+42
@@ -0,0 +1,42 @@
|
|||||||
|
%% 参数设置
|
||||||
|
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);
|
||||||
Reference in New Issue
Block a user