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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Problem comparing formatted constants

-MFra-
21-Topaz II

Problem comparing formatted constants

Good evening to all of the community,
I have this little problem (see photo) that I can't solve ... in fact I want the "Case 2" to work too. How to do?

case 1 & 2.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:-MFra-)

Try defining CMx simply as:

CMx(A,B) := A=B

 

Success!
Luc

View solution in original post

3 REPLIES 3
LucMeekes
23-Emerald III
(To:-MFra-)

Do you think your problem is related to the 'user-1' formatting of these variables?

What do you add p-numbers for, I don't see the function actually use the value of p...?

I bet it's the if-statement that doesn't like to compare different symbols (in Mathcad 11 even comparing alpha with alpha is a problem).

LM_20191128_Test.png

Since you want the function CMx to output a 0 or a 1: What if you evaluate the last two expressions numerically (=) instead of symbolically (->)?

 

Luc

LucMeekes
23-Emerald III
(To:-MFra-)

Try defining CMx simply as:

CMx(A,B) := A=B

 

Success!
Luc

-MFra-
21-Topaz II
(To:LucMeekes)

Hi,

Thank you very much.

case 1&2.jpg

Top Tags