How do I save plots calculated by gamultiobj separately?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
William
am 23 Dez. 2022
Kommentiert: William
am 29 Dez. 2022
Hello everyone,
I'm trying to solve a complex optimization problem using gamultiobj. For my analysis I need four plots for each scenario I'm going to analyze. The graphs are the following (don't mind the fact they're incomplete).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241517/image.png)
I have to put each graph on a Word file. Is there any way I can save each one of them separately without intervening on the code so I can then scale them as I best see fit directly on Word with no loss of image quality? I could screenshot the command window above but of course the quality would be quite poor. I can't add new commands on the code as of now since it takes a lot of computation time and the program is still running.
Any suggestions will be greatly appreciated!
Kind regards.
William
0 Kommentare
Akzeptierte Antwort
Benjamin Kraus
am 23 Dez. 2022
Unless the code that is doing the computation is explicitly leveraging some form of parallel processing, the code that exports figures to either files or the clipboard will run on the same thread as the computations. Therefore, you will need to cancel or pause the code somehow before you will be able to export any images.
You could try opening the MATLAB editor and clicking "Pause" (to pause your computation), but I don't know how well that would actually work, and a lot depends on exactly how the computation code was written.
I don't think you will be able to get a much better answer without posting more information about the computation code.
If you find yourself modifying the computation code, you can try leveraging backgroundPool to move the computation into a parallel process, and then you can probably add a button to your app that calls exportgraphics or copygraphics.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations 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!