https://github.com/HTDerekLiu/SpecCoarsen_MATLAB
Tip revision: 749b4bf2aa89143c0b50c9a2a50a6fbd6b115919 authored by HTDerekLiu on 12 September 2019, 16:56:12 UTC
update number of eVec in use
update number of eVec in use
Tip revision: 749b4bf
eigsReal.m
function [eVal, eVec] = eigsReal(L, massMat, numEigs)
[eVec, eVal] = eigs(L + 1e-8.*speye(size(L,1),size(L,1)), massMat, numEigs, 'sm');
[~ ,i] = sort(diag(abs(eVal))); % sort
eVal = sum(eVal,2);
eVal = eVal(i) - 1e-8;
eVec = eVec(:,i);