out of memory error!

조회 수: 2 (최근 30일)
lilish
lilish 2014년 12월 10일
댓글: lilish 2014년 12월 11일
hi, I'm running a code in matlab to read data from a file which has a 512*512*512 volume by fread command. when i run it for the 512*512 amount of the file it works, but when I want to read the whole data to be able to image them it doesn't work and display 'out of memory error'. so I really need to have all data together to image them. do you think what this error happen and how i can fix it. my laptop'RAM is 3GB and my system is 32-bit. i'm looking to hearing from you. Thanks

채택된 답변

Ryan
Ryan 2014년 12월 10일
You could use a memmapfile. I'm not entirely sure how it works, but a memory map does not actually load the data into memory. That way you can process pieces parts, if that's what you want to do. Check out
doc memmapfile
  댓글 수: 1
lilish
lilish 2014년 12월 11일
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Sean de Wolski
Sean de Wolski 2014년 12월 10일
Either buy a bigger computer with 64 bit OS and MATLAB, or downsample your data.

Matt J
Matt J 2014년 12월 10일
Maybe you can read the image in as uint8, or some other type smaller than double,
A = fread(fileID, 512^3, 'double=>uint8');

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by