![]() ![]() > which is how I found package rARPACK, which may be exactly what you need/want. eigenvalue decomposition using matlab Ask Question Asked 4 years, 1 month ago Modified 4 years, 1 month ago Viewed 946 times 2 I would like to diagnolize a rank-1 matrix using the well known eigenvalue decomposition as U H A U d i a g ( M, 0,, 0), where A is a Hermitian matrix and U is a unitary matrix. > You can find possibly relevant stuff with ![]() Is there any R function that will allow me to extract just the few that I want? This would be analogous to the = eigs(X,K) function in Octave/MATLAB. Usually I want only the first 10 eigenvectors instead of all 10,000. Sometimes X has 100 million elements or more. > In order to do that, I have to create the matrix eigs$vectors which is the same size as X. ![]() > eigs > K_eigenvectors > K_eigenvalues > rm(eigs) > I have a symmetric matrix, X, and I just want the first K eigenvectors (those associated with the K largest eigenvalues). > eigs_sym(X, 10) # If X is of class "matrix" The state of the sytem, which could record, say, the populations of a few interacting species, at one time was described by a vector xk. > eigs(X, 10) # If your X is of class "dsyMatrix" 10 In the last section, we used our understanding of eigenvalues and eigenvectors to describe the long-term behavior of some discrete dynamical systems. > The syntax is intended to mimic eigs() in Matlab and Octave. Statistics to work with a few eigenvectors instead of with all of them. I hope the R development team will consider expanding theįunctionality of eigen() to include the option to retain only the firstįew eigenvectors and/or eigenvalues. Thank you, and thanks for writing that code! That is the perfect answer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |