vectorize without using loop

I believe there's way to vectorize the following code without using the loop
for i = 1:length(indtrn)
Xtrn(i, :) = X(indtrn(i), indtrn);
end
Can someone shed me some light? Thanks in advance.

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 18일

0 개 추천

out=X(indtrn,indtrn)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2013년 3월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by