A single column vector or an array, which is faster?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!