cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

IF & AND statements logic

SA_9950729
6-Contributor

IF & AND statements logic

Having a problem getting the following to work, I think it's really just logic, as trying to use to determine which one equation from 4 should be being used! 

SA_9950729_0-1633163871220.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ttokoro
19-Tanzanite
(To:SA_9950729)

If you don't define and function, and(M, N) is a graphics function. Therefore use "and" operator that I show the second line and the if function operate. 

image.pngimage.pngimage.png

View solution in original post

4 REPLIES 4
ttokoro
19-Tanzanite
(To:SA_9950729)

If you don't define and function, and(M, N) is a graphics function. Therefore use "and" operator that I show the second line and the if function operate. 

image.pngimage.pngimage.png

SA_9950729
6-Contributor
(To:ttokoro)

@ttokoro many thanks, don't fully appreciate what you have explained, but understand it's application 🙂

 

 


@SA_9950729 wrote:

Having a problem getting the following to work, I think it's really just logic, as trying to use to determine which one equation from 4 should be being used! 

SA_9950729_0-1633163871220.png

 


ttokoro's way is the correct way to address the problem; that is, using the boolean operator ∧ from the Math ribbon's Operator tab, in the Comparsion goup.

 

2021 10 02 B.png

 

An alternative (having done all the hard work in writing and functions!) and one that I use for other booleans, is to define function's and, or, xor, etc to use as seems fit.  

 

2021 10 02 A.png

 

I've often found it necessary, not just convenient, to use these functions when I need to pass one or the other as an argument to a function.

 

2021 10 02 C.png

 

You can't do that with an operator.

 

The attached worksheet was created in Mathcad Express 7, but the concept should work in almost any version of Mathcad.

 

Stuart

thanks for your feedback & input, appreciated..