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.

If else condition

Please login with a confirmed email address before reporting spam

Hello Dear,

I am trying to define if else condition in comsol. How and where in comsol do I define the following condition attached below?

Kind regards, Bright



1 Reply Last Post 07.02.2018, 02:55 GMT-5
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 07.02.2018, 02:55 GMT-5

Try the if-operator: E.g., if(x>=0, sqrt(x), 0). This operator can be used in all edit fields where you enter expressions.

Try the if-operator: E.g., if(x>=0, sqrt(x), 0). This operator can be used in all edit fields where you enter expressions.

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.