Question: How to import a big matrix into matlab?
0
gravatar for roy.granit
4.7 years ago by
roy.granit800
Israel/LabWorm
roy.granit800 wrote:

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

matlab matrix • 3.2k views
ADD COMMENTlink modified 4.7 years ago by Adam990 • written 4.7 years ago by roy.granit800
0
gravatar for Michele Busby
4.7 years ago by
Michele Busby2.0k
United States
Michele Busby2.0k wrote:

That should be no problem.

http://www.mathworks.com/matlabcentral/answers/91711-what-is-the-maximum-matrix-size-for-each-platform

What did you try and what did it say?

ADD COMMENTlink written 4.7 years ago by Michele Busby2.0k
0
gravatar for roy.granit
4.7 years ago by
roy.granit800
Israel/LabWorm
roy.granit800 wrote:

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)

ADD COMMENTlink written 4.7 years ago by roy.granit800
0
gravatar for Adam
4.7 years ago by
Adam990
United States
Adam990 wrote:

Try exporting from excel as a text file and then loading into MATLAB. 

ADD COMMENTlink written 4.7 years ago by Adam990
0
gravatar for mikhail.shugay
4.7 years ago by
mikhail.shugay3.3k
Czech Republic, Brno, CEITEC
mikhail.shugay3.3k wrote:
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.
ADD COMMENTlink written 4.7 years ago by mikhail.shugay3.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1575 users visited in the last hour