# 2004 年 11 月 11 日作成 rep.no<-1000000 ell.1<-rep(0,rep.no) ell.2<-rep(0,rep.no) #ell.1; ell.2 for (i in 1:rep.no){ xw.1<-rnorm(10,0,1) xw.2<-rnorm(10,0,1) xw<-matrix(c(xw.1,xw.2),10,2) #xw w<-t(xw)%*%xw #w eigen.w<-eigen(w) #eigen.w lam<-c(eigen.w$values) hmat<-matrix(eigen.w$vectors,2,2) #lam; hmat ell.1[i]<-lam[1]/10; ell.2[i]<-lam[2]/10 } plot(density(ell.1),xlim=c(0,4),ylim=c(0,2.0),xlab="",ylab="",main="density of eigenvalues") par(new=T) plot(density(ell.2),xlim=c(0,4),,xlab="",ylab="",ylim=c(0,2.0),main="")