필터 지우기
필터 지우기

PCA (dimension reduction) in embedded matlab

조회 수: 1 (최근 30일)
Rajaram B S R
Rajaram B S R 2011년 9월 6일
Hi
I have a 22x22 matrix 'Y' which needs to be dimension reduced to 10 principal values (The principal values are chosen by choosing the top 10 eigenvectors of 'Y') and the remaining rows should be filled with zeros all the while maintaining the order.
I am quite new to matlab so it would be a great help if someone could help me out with the coding.

채택된 답변

Rajaram B S R
Rajaram B S R 2011년 9월 6일
for i = 1 : 22
for a = 1 : 12
if (i == req_idx(a))
for j = 1 : 22
Y_dr(i,j) = Y(i,j);
end
else
for k = 1 : 22
Y_dr(i,k) = 0;
end
end
end
end
I have written the code as shown above and have used the sort function to get the principal components which gives an ascending or descending order but I need the 'req_idx' variable to be in appropriate order.
Kindly Help !
  댓글 수: 2
bym
bym 2011년 9월 6일
do not accept you own answer and include a question in it... most people will skip answered questions unless they are searching for an answer. That said, I do not understand your question
Rajaram B S R
Rajaram B S R 2011년 9월 20일
Hi Proecsm,
I figured out my problem and fixed it.
Thank you for pointing out about answering my own question. I meant to edit and I ended up answering and accepting it by mistake.
Thanks !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by