lrds > whiten.m

whiten

PURPOSE ^

whiten - Perform whitening

SYNOPSIS ^

function [xcv, Ww]=whiten(xcv)

DESCRIPTION ^

 whiten - Perform whitening

Synopsis:
 [xw, Ww]= whiten(xcv)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [xcv, Ww]=whiten(xcv)
0002 % whiten - Perform whitening
0003 %
0004 %Synopsis:
0005 % [xw, Ww]= whiten(xcv)
0006 %
0007 
0008 [T,C,n]= size(xcv);
0009 
0010 if T==1
0011   C= sqrt(C);
0012   xcv= reshape(xcv, [C,C,n]);
0013 end
0014 
0015 Sigma = mean(xcv,3);
0016 [EV, ED]=eig(Sigma);
0017 Ww = EV*diag(1./(sqrt(diag(ED))))*EV';
0018 
0019 xcv = matmultcv(xcv, Ww);

Generated on Sat 26-Apr-2008 15:48:23 by m2html © 2003