Matlab and memory use
显示 更早的评论
Hi, How I can compute how much RAM memory this matrix rand(500,500) take?
采纳的回答
更多回答(1 个)
Reza Bonyadi
2017-10-23
编辑:Reza Bonyadi
2017-10-24
0 个投票
xx= rand(500,500); h=whos('xx');
h.bytes is what you want then. This is an estimate, as there might be some compressions in place during the usage of the variable. Note that, as different variable may have different types (int, double, ...), whos is a good option as it considers the real size and not sensitive to the type. For example, xx=int8(randi(100,500));h=whos('xx');h.bytes gives you 250,000 while the previous example gives you 2,000,000. So you dont need to know how many bytes are considered for each type in Matlab.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!