📄 testjointdiag.m
字号:
% A quick test of the joint diagonalization vode.clearM = 32 ; % DimensionK = 32 ; % Number of matrices in the stackthreshold = 1.0e-10 ; % Accuracy%% building a random orthonormal matrix Urmat = randn(M) ;[U , dump ] = eig (rmat+rmat') ;clear rmat dump ;%% Building a stackStack = zeros(M,M,K) ;for k=1:K rdiag = diag(randn(1,M)) ; Stack(:,:,k) = U*rdiag*U' ;end% Checking the checks in the Matlab/C interface%U = JointDiag(randn(M),K,M, 1.0e-3)%U = JointDiag(randn(2,3,4),K,M, 1.0e-3)% Checking the computationsV = JointDiag(Stack, threshold) ;fprintf('OK if this is a signed permutation ?:\n');V*U
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -