Figure taking up too much ram and sometimes crashing.
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Derek
am 16 Aug. 2023
Beantwortet: Angelo Yeo
am 16 Aug. 2023
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 Kommentare
Akzeptierte Antwort
Angelo Yeo
am 16 Aug. 2023
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Printing and Saving finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!