Figure taking up too much ram and sometimes crashing.
7 次查看(过去 30 天)
显示 更早的评论
I am doing pretty big basins of attraction, and every time I create them, they end up being really slow and taking up a ton of ram. It will take a few minutes for me to be able to save them, and then it will take much more for it to end up saving. One time, it crashed and Matlab offered a package that I could download to help process the figure better, but I cannot seem to find it. I could also scale down the basins, but they look nice and help distinguish well.
I would appreciate if somebody knew what package could help with this.
0 个评论
采纳的回答
Angelo Yeo
2023-8-16
I believe one of the options you can take is to save the figure to disk without rendering the figure window. Please refer to the code below and see if it would be a good option for you.
h = figure('Visible','Off'); % Creating a figure and not displaying it
ax = axes; % Create an Axes;
plt = plot(ax,1:10,1:10,'r'); % Plot an arbitrary line in the axes
set(h,'CurrentAxes',ax); % Set current Axes of figure to 'ax'
print(h,'-djpeg','fname.jpeg')% Print the plot to file 'fname.jpeg'
% exportgraphics(h, 'myfilename.png'); % An alternative for "print".
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!