Skip to main content
1-Visitor
January 29, 2014
Question

Less than...

  • January 29, 2014
  • 3 replies
  • 1713 views

How to limit the value of an ecuation?

I need to enter this:

x=a+b, but less than x=c+d

a+b>c+d => x=c+d

If I enter x=a+b<=c+d ,in case of a+b>c+d I get x=0,but I need to get x=c+d instead of 0

3 replies

1-Visitor
January 29, 2014

Which version of Mathcad are you using?

Mike

1-Visitor
January 29, 2014

Mathcad Express Prime 3.0

24-Ruby IV
January 29, 2014

For both - Mathcad 15 and Prime:

x := if(a + b < c + d, a + b, c + d)

25-Diamond I
January 29, 2014

Apart from a programming approach you could also use the if() function or even more compact the min() function.

conditions.png