필터 지우기
필터 지우기

vectorize without using loop

조회 수: 1 (최근 30일)
Eric
Eric 2013년 3월 18일
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일
out=X(indtrn,indtrn)
  댓글 수: 1
Eric
Eric 2013년 3월 19일
exactly. Thank you, Azzi.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by