How to suppress the 'Error in sweep' message and continue to execute the following code?

Please login with a confirmed email address before reporting spam

Hi, there!

I use livelink for matlab to preform parameter sweep. Through this code

model.batch('p1').set('err', false);

the 'stop if error' box is uncheck. Indeed, comsol will continue with the next parameter value if the current one encounters error.

However, when the parameter sweep is finished, comsol will pass all the error messages to matlab and stop matlab from executing the following post-process codes. Then, I have to execute these codes manually.

I was wondering if there was a way to protect the execution of matlab code from the disturbance of 'Error in sweep' message, so that matlab could running the following post-process codes automatically.

Best regards,

HC


1 Reply Last Post 2024年7月23日 GMT-4 06:33

Please login with a confirmed email address before reporting spam

Posted: 4 days ago 2024年7月23日 GMT-4 06:33
Updated: 4 days ago 2024年7月23日 GMT-4 06:34

a way that might work is to put the matlab command of 'compute' into a matlab subfunction

a way that might work is to put the matlab command of 'compute' into a matlab subfunction

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.