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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. 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

 

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

Announcements

Top Tags