Is there a method to linear index to a transpose matrix without taking the transpose?
조회 수: 10 (최근 30일)
이전 댓글 표시
Is there a method to linear index to a transpose matrix without taking the transpose?
댓글 수: 5
Image Analyst
2019년 6월 19일
What code is that? Where did you attach it? Who wrote it?
And what is wrong with using the transpose operator '? Why do you need a different way?
채택된 답변
Douglas Farinelli
2019년 6월 18일
댓글 수: 2
Walter Roberson
2019년 6월 18일
Yes.
Note: for a 2D matrix, ind2sub is (column_number - 1) * number_of_rows + row_number .
You can therefore optimize the access (row_number, column_number) to the transpose (column_number, row_number) as
(row_number - 1) * number_of_rows + column_number
추가 답변 (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!