A single column vector or an array, which is faster?
古いコメントを表示
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?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!