indexing of a matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
hi, i av a 200*3588 matrix and i want to index paired numbers from each column.is there a matlab function that will help me do it or do i av to do it manually? thanks in advance
채택된 답변
Walter Roberson
2011년 11월 9일
rowidx = [rowidx1, rowidx2, rowidx3, ... rowidx200];
matind = sub2ind(size(YourMatrix), [rowidx; 1+rowidx], repmat(1:size(YourMatrix,2), 2, 1) );
pairedValues = YourMatrix(matind);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!