0001
0002
0003
0004
0005
0006
0007
0008 clear all; close all;
0009
0010
0011
0012
0013 M = 3;
0014 Ll = 3;
0015 Lq = 3;
0016
0017
0018
0019
0020 Lambda=zeros(M,M,Ll);
0021 for i = 1:M,
0022 dummy = randn((Ll+1)/2,1);
0023 Lambda(i,i,:) = conv(dummy,conj(flipud(dummy)));
0024 end;
0025 Q = zeros(3,3,1);
0026 Q(:,:,1) = eye(3);
0027 for i = 1:Lq-1,
0028 dummy = randn(M,1);
0029 dummy = dummy/norm(dummy);
0030 U = zeros(M,M,2);
0031 U(:,:,1) = eye(3)-dummy*dummy';
0032 U(:,:,2) = dummy*dummy';
0033 Q = PolyMatConv(Q,U);
0034 end;
0035 R = PolyMatConv(Q,PolyMatConv(Lambda,ParaHerm(Q)));
0036
0037
0038
0039
0040 L_hat = PolyMatAnalyticEigValues(R);
0041 Q_hat = PolyMatAnalyticEigVectors(R,L_hat);
0042 Lambda_hat = zeros(M,M,size(L_hat,2));
0043 for m = 1:M,
0044 Lambda_hat(m,m,:) = L_hat(m,:);
0045 end;
0046
0047
0048
0049
0050 figure(1); PolyMatDisplay(real(Lambda));
0051 figure(2); PolyMatDisplay(real(Q));
0052 disp('ground truth in Figs. 1 and 2');
0053 figure(3); PolyMatDisplay(real(Lambda_hat));
0054 figure(4); PolyMatDisplay(real(Q_hat));
0055 disp('extractions in Figs. 3 and 4');
0056