Is there a method to linear index to a transpose matrix without taking the transpose?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Douglas Farinelli
el 18 de Jun. de 2019
Comentada: Douglas Farinelli
el 19 de Jun. de 2019
Is there a method to linear index to a transpose matrix without taking the transpose?
5 comentarios
Image Analyst
el 19 de Jun. de 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?
Respuesta aceptada
Douglas Farinelli
el 18 de Jun. de 2019
2 comentarios
Walter Roberson
el 18 de Jun. de 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
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!