Skip to main content
21-Topaz II
November 28, 2019
Solved

Problem comparing formatted constants

  • November 28, 2019
  • 2 replies
  • 1492 views

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

 

Best answer by LucMeekes

Try defining CMx simply as:

CMx(A,B) := A=B

 

Success!
Luc

2 replies

23-Emerald IV
November 28, 2019

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

LucMeekes23-Emerald IVAnswer
23-Emerald IV
November 28, 2019

Try defining CMx simply as:

CMx(A,B) := A=B

 

Success!
Luc

-MFra-21-Topaz IIAuthor
21-Topaz II
November 29, 2019

Hi,

Thank you very much.

case 1&2.jpg