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!