jdb2.m

来自「盲信号处理牛人cardoso」· M 代码 · 共 41 行

M
41
字号
% Calling  the joint approximate diagonalization function.

M=3   % dimension
N=3   % Number of matrices
snr=0.025
seuil   = 1.0e-12; % precision on joint diag 
K=1

for k=1:K
   k

% drawing a `random' unitary matrix
U= randn(M)+i*randn(M) ; 
[U,to_waste]=eig(U+U'); 
U=randn(M,M)+i*randn(M,M);
V=U'
V=inv(U);
% Drawing a random set of commuting matrices
A=zeros(M,M*N);
for imat=1:N
  cols          = 1+(imat-1)*M:imat*M;
  A(:,cols)     = U*diag(randn(M,1)+i*randn(M,1))*V;
  
end

% Perturbation of the joint structure ?
 A = A + snr*randn(M,M*N);


%% Do it
[ V , DD ] = joint_diag(A,seuil);

%% should be permutation matrix 
abs(V'*U)
DD=abs(DD);
DD

end


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?