
374 Change Detection
Listing 9.2: Iterated principal components (continued).
1 U[ frozen ,0] = 1.0
2 U[ frozen ,1] = 0.0
3 FOR j =0 ,1 DO U [* , j ]= U [* , j ]/ t otal (U ,2)
4 EM , PCs [1 ,*] , U , Ms , Ps , Fs , T0 =0 , $
5 unfr ozen = unf rozen
6 ; weighted covariance matrix
7 covpm - > update , bitemp , wei ghts =U [* ,0]
8 C = covpm - > c ovaria nce ()
9 eivs = ei genql (C, eigenve ctors =V , / do uble )
10 OPLOT , [ -1 ,1] ,[ - abs ( V [0 ,1]/ V [0 ,0]) , $
11 abs ( V [0 ,1]/ V [0 ,0])] , li nestyl e =2 , color =0
12 PCs = bit emp ## transpose ( V)
13 iter ++
14 END UNTIL iter GE niter
15
16 ; retu rn resu lt to ENVI
17 out_ar ray = fltarr ( num_cols