Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 25916

Export animation/image sequence via Matlab Livelink

$
0
0
Hi,

I'm have a HT problem which I solve time dependently via the Matlab Livelink. Since I have a lot of models to solve this way, I would like to export the image sequence of the solution automatically to e.g. pic1.png, pic2.png, ...,picx.png.

I have created the following m-code, however it does NOT produce any warning/error, NOR it produces my wanted .png files:
(plotgroup2 is set-up properly)
model.result.export.create('anim1', 'Animation');
model.result.export('anim1').set('plotgroup', 'pg2');
model.result.export('anim1').set('type', 'imageseq');
model.result.export('anim1').set('sweeptype', 'solutions');
model.result.export('anim1').set('imagefilename', 'C:\files\pic.png');
model.result('pg2').set('window', 'graphics');
model.result('pg2').set('windowtitle', 'Plot of HT');
model.result('pg2').run;
model.result.export('anim1').run;

If I open my .mph file afterwards and click the export button, everything works fine and my files are created, but somehow the Livelink won't produce the images.

Who knows why this is?


Regards,

Peter.


Viewing all articles
Browse latest Browse all 25916

Trending Articles