I have a really big matrix I need to import into matlab (480X70,000 = 160MB) yet for some reason this seems like an impossible mission to import this file into Matlab. That is really strange since one assumes that Matlab will know to handle big matrices.
Will be happy to hear there are some suggestions.
Thanks,
Roy
4 answers
That should be no problem.
What did you try and what did it say?
I've tried many things - import using the matlab 'visual interface' and several commands lines, each time it tells me there isn't enough memory or some other kind of error.
e.g.
>> num=xlsread('table_bits_sorted_norm.xls')
Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD
for more information.
> In xlsread at 176
??? Error using ==> xlsread at 234
File contains unexpected record length. Try saving as Excel 98.
(I'm using a new MabBook pro with 8gb memory, and Matlab 2010a. Also tried to do this on a PC with Matlab 2013a)
Try exporting from excel as a text file and then loading into MATLAB.
I think you need to melt it, I.e. turn it into a long list of row id \t col id \t value entries. Then load it as sparse matrix. Btw this is a stackoverflow, not bioiformatics, question.
Log in to answer this question.