sir I found sum of eigen values of a square matrix. Now I want to find the number of components which cover up to 0.95(95%). My part of prgramme is given in body

sumlamda=0;
for i=1:p
sumlamda = sumlamda+lamda(i);
end
sum=sumlamda
ccomp=0;
s =lamda(p)/sum;
for i =(p-1):1
if s <=0.95
ccomp = ccomp+1;
end
s=(lamda(i)+lamda(i+1))/sum ;
end
ccomp

Asked:

on 18 Jan 2016

Edited:

on 18 Jan 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!