How do I save plots calculated by gamultiobj separately?

1 view (last 30 days)
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).
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

Accepted Answer

Benjamin Kraus
Benjamin Kraus on 23 Dec 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.
  1 Comment
William
William on 29 Dec 2022
Thank you for you answer and I apologize for the belated reply.
You've been of great help. Thank you again.
Kind regards,
William

Sign in to comment.

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!