The Libsvm library provides several functions to interface with Matlab. Such functions load the entire matrix into memory. However this approach is not suitable for very large datasets (think 'mnist8m' which is 20GB in size).
Libsvm_Incremental_Loader provides a solution to this problem: It allows you to load each row into memory iteratively, without storing the entire matrix. Useful for very large files. An example is provided along with the code.
Dang Manh Truong (2020). Load Libsvm files incrementally (one row at a time) (https://www.mathworks.com/matlabcentral/fileexchange/63446-load-libsvm-files-incrementally-one-row-at-a-time), MATLAB Central File Exchange. Retrieved .
Modified the description