Matlab kills itself when my matrix is bigger than 7.5 GB
Show older comments
Hi, I need to create a variable with the size 20x529x413x672; however, when Matlab gets to 20x529x413x215 it kills itself (variable size ~7.5Gb). I would like to know if someone has any suggestions to deal with this huge variable. Would parallel processing help me in this case? Or the easiest way would be to split my variable in two?
Any suggestion would be appreciated.
Accepted Answer
More Answers (1)
MJFcoNaN
on 2 Jan 2023
0 votes
Hello,
It is often the RAM that limits variable size and parallel may not help. You may try to allow more RAM by matlab: Preference-general-java heap. If your computer does not have enough RAM, to split it is a good choice.
PS: If you don't need to load the whole huge variable laterly, you can create a .mat file in a powerful computer and "Access and change variables in MAT-file without loading file into memory" by the function of "matfile", which may simplify some code even with limited RAM.
1 Comment
Leilane Passos
on 3 Jan 2023
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!