A single column vector or an array, which is faster?
Mostrar comentarios más antiguos
Let's say we have a column vector A with size (N*M, 1) and an array B with size (N, M). N and M are very large numbers.
Which of the strucute has faster speed in terms of
- indexing. e.g., A(i*j) vs B(i,j)
- Assignment e.g., A(i*j) = x vs B(i,j)=x
- Memory efficiency. Do they allocate the same memory size?
What would be the pros and cons choosing a vector or array for storing data?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!