Running a long program while plotting slows down the program. How can I make it so that Matlab doesn't store so much data in the figure?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hi, friends! I'm building a program that has to collect data and plot it for a long period of time (sometimes ranging past a week). However, the problem is it slows down when it runs for even more than a few hours. This causes problem with the data as it needs to be collected every second.
Converting data into single precision helped slightly, but the main problem is that Matlab is still storing lots of data somewhere, causing it to slow down. My best guess is the plot itself (which needs to display a 10 window), however, I cannot access it.
Is there a way to access the plot's data and compress it? Is there something else I should be looking at?
Thanks!
Edit: I have not profiled me code yet. I will do that and get back with what section is causing the slowdown.
3 个评论
jgg
2016-1-26
I think you need more information; have you tried profiling your code to see where it is slow?
I'm kind of skeptical it's the plot, since this just processes underlying data objects and doesn't retain a lot of data on its own. However, who knows; Matlab graphics are still kind of opaque.
It would be helpful if you posted code to show us what you're plotting and how it works.
Rodmehr Semnani
2016-1-26
Walter Roberson
2016-1-26
If you cannot access the plot, then how could the data for the plot possibly be compressed?
Is it a line plot?
Which MATLAB version are you using?
回答(1 个)
Daniel Armyr
2016-2-3
0 个投票
This file exchange entry should help you plot even large data without significant slow-down.
0 个评论
此问题已关闭。
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!