Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Saving images using script

Please login with a confirmed email address before reporting spam

Hi,

I would like to automatically output images from postprocessed results and write them to disc using script code.

I successfully used "postmovie(fem, 'filename','Movie.avi', ..." to generate movies but I have not found a way to save images (e.g. with postplot or postslice?). The images open in the matlab interface but are not written to disc.

What is the syntax for image export?

Matthias


2 Replies Last Post 28.02.2011, 08:23 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.02.2011, 08:01 GMT-5
For these purposes I always use the "export_fig" tool available from the MATLAB file exchange. It can export your figures in many formats and has nice options, such as e.g. antialiasing and more!

You can get it at: www.mathworks.com/matlabcentral/fileexchange/23629-exportfig
For these purposes I always use the "export_fig" tool available from the MATLAB file exchange. It can export your figures in many formats and has nice options, such as e.g. antialiasing and more! You can get it at: http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.02.2011, 08:23 GMT-5
Hi Johannes,

thank you very much for the link.

This tool works nicely and solves my problem!

Matthias
Hi Johannes, thank you very much for the link. This tool works nicely and solves my problem! Matthias

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.