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.

OPERATOR IF

Please login with a confirmed email address before reporting spam

Dear All,

can any one tell me how to you operator if(cond,expr1,expr2). this is explain in quick refference guid. But it didnt give any answer when i try to use it under expresstion.

chandima

1 Reply Last Post 2010/08/03 1:00 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010/08/03 1:00 GMT-4
Hi

from another discussion I have copied this expression
if(nx*x+ny*y>=0,1,-1)

if (nx*x+ny*y) "greater or equal" to "0" then if true if()=1 else if()=-1

--
Good luck
Ivar
Hi from another discussion I have copied this expression if(nx*x+ny*y>=0,1,-1) if (nx*x+ny*y) "greater or equal" to "0" then if true if()=1 else if()=-1 -- Good luck Ivar

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.