Significantly different time taken to index different columns of an array?
Show older comments
When profiling my code I noticed inconsistent array indexing, as seen in the simplified version of my code below (I know that isn't the best way to sum arrays - just done to illustrate the problem). "patchIndex" is a 300 or so element cell array, where each cell consists of a nx3 array where n is a number in the order of 50000, but varies across cells. Why does it take so much longer to index the third column of the array? This happens regardless of the order in which the columns are indexed.
Cheers

Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!