How to isolate negative eigenvalues and store them an an array with their corresponding eigenvectors in another array
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zechariah Kaufman
el 20 de Feb. de 2020
Respondida: Siriniharika Katukam
el 25 de Feb. de 2020
I am trying to isolate the negative eigenvalues and store them an an array with their corresponding eigenvectors in another array. I uderstand I need to use the eig function and i believe a for loop needs to be used to go through all of the eigenvalues but I can't figure out how to isolate the negative values in an array and get the eigenvectors that corrospond with those negative eigenvalues in an array. Any help is appreciated
eigenvalue = eig(Z);
[EigenVector,D] = eig(Z);
0 comentarios
Respuestas (1)
Siriniharika Katukam
el 25 de Feb. de 2020
Hi
These lines of code can be used by you:
negEigenInd = find(eigenvalue< 0); %Indices
reqEigenVector = EigenVector(negEigenInd);
reqEigenvalue = eigenvalue(negEigenInd);
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!