MATLAB: Is there any way to load parts of a large table from a mat-file

matfilesubindexingtable

I a trying to load parts of a very large table using subindexing.
f=matfile(fileName);
sub=f.X(1:10,:);
I get the following error: The variable 'X' is of class 'table'. To use 'X', load the entire variable. Why? Should I store tables in a different format than matfiles?
M

Best Answer

This is one of the documented limitations of the matfile object.
" matfile does not support indexing into:
  • Variables of tables"
Since you're working with data that's too big to fit in memory, you should explore if tall arrays satisfy your needs. You can create tall table arrays as shown in the "Creating Tall Tables" section of that documentation page.