why my empty cell array taking 104 bytes instead of 112 bytes..?
显示 更早的评论
Hello,
it is mentioned in the document that,
an empty cell array will take
30 bytes for 32 bit systems
& 112 bytes for 64 bit systems.

i got confused why my 64 bit system is taking 104 bytes of memory for an empty cell array..
can someone please explain me..?
Thanks in advance ..!
采纳的回答
更多回答(1 个)
Image Analyst
2020-9-6
1 个投票
Cell arrays take a huge amount of overhead. Don't use them unless you have to, which means you'll have different kinds of variables in each cell. Otherwise use a double array if they're all numbers, or a table if it's a mixture of variable classes (e.g. strings and numbers) but each column will be all of the same class.
See the very first item on the FAQ: What is a cell array?
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!