Is there a method to linear index to a transpose matrix without taking the transpose?
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Douglas Farinelli
il 18 Giu 2019
Commentato: Douglas Farinelli
il 19 Giu 2019
Is there a method to linear index to a transpose matrix without taking the transpose?
5 Commenti
Image Analyst
il 19 Giu 2019
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?
Risposta accettata
Douglas Farinelli
il 18 Giu 2019
2 Commenti
Walter Roberson
il 18 Giu 2019
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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!