Digital Signal Processing Reference
In-Depth Information
hold on
plot(ONEDPV(4:6),zeros(1,3),'d')
hold on
plot(ONEDPV(7:9),zeros(1,3),'s')
hold on
plot(ONEDPV(10:12),zeros(1,3),'ˆ')
MEANVECTOR1=[mean(ONEDPV(1:3)) mean(ONEDPV(4:6)) ...
mean(ONEDPV(7:9)) mean(ONEDPV(10:12)) ];
%2D projection of the training data
figure
[E2,V2]=eigs(pinv(SB)*SW,2);
TWODPV=E2'*K';
MEANVECTOR2=[mean(TWODPV(:,1:3)') ;mean(TWODPV(:,4:6)');...
mean(TWODPV(:,7:9)'); mean(TWODPV(:,10:12)') ];
plot(TWODPV(1,1:3),TWODPV(2,1:3),'*')
hold on
plot(TWODPV(1,4:6),TWODPV(2,4:6),'d')
hold on
plot(TWODPV(1,7:9),TWODPV(2,7:9),'s')
hold on
plot(TWODPV(1,10:12),TWODPV(2,10:12),'ˆ')
tr=[2 4 6 8 10 12 14 16 18 20 22 24];
D=double(D);
COLLECT2=[ ];
for i=1:1:12
D1=imresize(D(:,:,1,tr(i)),[12 12]);
COLLECT2=[COLLECT2; reshape(D1,1,12*12)];
end
COLLECT2=COLLECT2';
Ktest=[];
for i=1:1:12
for j=1:1:12
Ktest(j,i)=k11(COLLECT2(:,i),COLLECT1(:,j),1);
end
end
%1D projection for the testing data
ONEDPV=E1'*Ktest;
DETECTEDAS1D=[];
for i=1:1:12
[P,Q]= min((repmat(ONEDPV(i),1,4)-MEANVECTOR1).ˆ2);
DETECTEDAS1D=[DETECTEDAS1D Q];
end
REF=[1 1 1 2 2 2 3 3 3 4 4 4];
POS1D=length(find((REF-DETECTEDAS1D)==0))/12;
%2D projection of the testing data
Search WWH ::




Custom Search