MATLAB Answers

Memory Usage of Figure

21 ビュー (過去 30 日間)
Sugar Daddy
Sugar Daddy 2020 年 6 月 26 日
コメント済み: Sugar Daddy 2020 年 7 月 1 日
I have a figure containing 20 tabs where each tab contains 4 subplots with 2 line plots on each axes.
Now i want to find out the memory utilized by this figure?

Edit-1:

When i save the figure, its size is only 1.77 MB but when i open it and start switching tabs, memory size start increasing and cosume approx. 2GB

Edit-2:

Figure described above is attached
Regards,
Sugar

採用された回答

Walter Roberson
Walter Roberson 2020 年 6 月 26 日
No method is provided of figuring out how large an object is that is referred to by a graphics handle.
You can get an approximation by using struct() on the handle and checking the size of the struct. However, graphics handles often refer to other graphics objects, and it is not uncommon for graphics objects to indirectly refer to themselves, so you would need some code to recursively descend the object without loops, adding up the sizes as you go.
Such a tool is generally possible; I have had reason to chase through graphics trees myself. But it is a fair bit of work to get right, and Mathworks keeps updating the graphic object representation, so you have to keep updating the code with every new release.
  7 件のコメント
Sugar Daddy
Sugar Daddy 2020 年 7 月 1 日
Thanks a lot Sir

サインインしてコメントする。

その他の回答 (0 件)

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by