R version 2.8.1 (2008-12-22) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > C <- matrix(c(1.75,-1.299,-1.299,3.25),nrow=2,byrow=T) > U <- eigen(C)$vectors > Lambda <- diag(eigen(C)$values) > Lambdanj <- diag(sqrt(eigen(C)$values)) > b <- c(0,2) > A <- U %*% Lambdanj > d <- NROW(b) ; n <- 100 ; N <- (d * n) ; Pistematriisi <- matrix(c(1:N),nrow=n,byrow=T) ; for(i in 1:n){ x.randv.iid <- rnorm(d,0,1) ; y.randv <- (A %*% x.randv.iid + b) ; for(j in 1:d){ Pistematriisi[i,j] <- y.randv[j] } } > plot(Pistematriisi[,1],Pistematriisi[,2])