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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to limit in equal to

ZZ_10687107
6-Contributor

How to limit in equal to

Hello, I have a question. As you can see in attached picture, i want to create function if IL1 equal to IL2, but I want the equal to function to only consider 4 number of decimal places (ie: 0.6193). Is it possible? I use Mathcad Prime. Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

Math formatting only affects the way it is displayed it still is operating at full accuracy.

The trick is to use the round feature then compare if equal.

Capture.JPG

It is possible to do this to whole vector at once

Capture.JPG

Cheers

Terry

View solution in original post

5 REPLIES 5

Try this: click on IL1/IL2 and then click on Math Formatting tab, and change to the Decimal, and then increase/decrease to the 4 decimal numbers:

Cornel_1-1687247480388.png

 

 



Hi,

Math formatting only affects the way it is displayed it still is operating at full accuracy.

The trick is to use the round feature then compare if equal.

Capture.JPG

It is possible to do this to whole vector at once

Capture.JPG

Cheers

Terry

Thank you verry much terry, It works.

 

Thank you Cornel for your advice!

 

I guess a more common way would be to ask, if the absolute value of the difference is smaller than 10^-5  (or whatever)

You can apply this to the full vectors  but you must apply vectorization, as otherwise the absolute value is interpreted as length of the difference vector.

ZZ_10687107
6-Contributor
(To:Werner_E)

 Thank you Werner.

Top Tags