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 simulated model as mat file in matlab, livelink
Posted 6 oct. 2023, 17:24 UTC−4 General, LiveLink for MATLAB, Model Manager Version 6.1 3 Replies
Please login with a confirmed email address before reporting spam
Hi, I'm using matlab 2022 and comsol 6.1 ver.
I'm simulating comsol with matlab via livelink for various parameters with for loops. I import a mph file into matlab as 'model=mphopen("filename.mph"). Then I can access the result of simulation by accessing the model structure in matlab.
However, it is not possible to save the model structure as mat.file. so it's not possible to post processing once I closed them. According to the following link ( https://www.comsol.com/forum/thread/13088/saving-comsol-model-from-matlab-livelink?last=2015-07-01T14:43:11Z ), we can save the simulated model as mph.file and we can access it as post processing at any time later. However, saving each model as mph file requires too much memory space.. If I save it as m.file, I should re-run everytime to obtain the result again. Does anyone know how to save the simulated model in matlab as m.file, so I can access them easily at anytime later?