Largest lindexing supported by MATLAB?
Show older comments
What is the largest (linear) indexing supported by MATLAB? I would be good to know if there is an official specification for such thing.
4 Comments
Jiri Hajek
on 9 Dec 2022
Hi, I'd like to know the same for in-memory arrays, but for tall arrays, it seems there's no limit at all: " tall arrays can be arbitrarily large in the first dimension (that is, they can have any number of rows)." (see here)
Rik
on 9 Dec 2022
I seem to recall a post (probably by Walter) that indices are limited to 32 bit integers, but I only remember seeing explicit statements in the documentation itself for mat files.
Should be easy enough to find by trial and error, but I'm on mobile, so I can't use the editor to do so.
Jiri Hajek
on 9 Dec 2022
After some search and testing, it seems that information provided by the function intmax gives the answer for integers.
How? I don't see anything on that page related to maximum index size (only the unrelated max value). Using the same test that Rik proposed gives exactly the same error message as the default DOUBLE():
A = uint8(0);
A(flintmax) = 1;
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!