A <- matrix(c(1,2,0.1, 0.1,1,0.1, 0.1,0.1,0.5), 3,3)
svdDemo(A)
if (FALSE) {
B <- matrix(c( 1, 0, 1, 0, 2, 0, 1, 0, 2), 3, 3)
svdDemo(B)
# a positive, semi-definite matrix with eigenvalues 12, 6, 0
C <- matrix(c(7, 4, 1, 4, 4, 4, 1, 4, 7), 3, 3)
svdDemo(C)
}
Run the code above in your browser using DataLab