How can I load large files (~150MB) in MATLAB?

后端 未结 3 653
再見小時候
再見小時候 2020-12-09 06:14

I have a large MATLAB file (150MB) in matrix form (i.e. 4070x4070). I need to work on this file in MATLAB but I can\'t seem to load this file. I am getting an \"out of mem

3条回答
  •  萌比男神i
    2020-12-09 06:47

    If it is an image file, and you want to work with it, try the matlab block processing. By using it, you will load small parts of the file. Your function fun will be applied to each block individually.

     B = blockproc(src_filename,[M N],fun)
    

    In case it is an xml file, try the XML DOM Node mode together with SAX - (Thanks to @Nzbuu for pointing that out), but that seems to be an undocumented functionality.

    Also, if it is a textual file of any kind (Unlikely, due to the amount of data), try external tool to split.

提交回复
热议问题