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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

4-Participant

## Units get lost in subsequnet Formulas

I am using Mathcad Prime Release 8.0 and Datecode8.0.0.0

I have set of formulas with a units. If I change the unit on the result of the first formula the following formulas are loosing their unit.

Here are the errors that I faced
No error message or warning. Inconsistent results.

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald III
(To:WA_5194990)

1. You have defined F.motor as a function of phi, but it does not depend on phi. Why did you define it so?

2. You have defined F.motor and use an immediate evaluation ( the =   )  at the end of the definition. While that works to display the value, it (too) often leads to problems due to 'side effects', as in this case.

If you delete the = from the end of the definition of F.motor, the problem is gone.

If you want to see the value of F.motor, type an extra F.motor=, to get:

Success!
Luc

5 REPLIES 5
23-Emerald III
(To:WA_5194990)

Success!

Luc

4-Participant
(To:LucMeekes)

Hi Luc,

Here is the MCDX file. When I change the unit from N to kN the units in the subsequent lines get lost. The value is changing as well. I would have expected I can change the unit of the result after the (= sign) independently to any other unit of force.

Thank you for responding.

20-Turquoise
(To:WA_5194990)

If Fmoter does not depend on φ,

23-Emerald III
(To:WA_5194990)

1. You have defined F.motor as a function of phi, but it does not depend on phi. Why did you define it so?

2. You have defined F.motor and use an immediate evaluation ( the =   )  at the end of the definition. While that works to display the value, it (too) often leads to problems due to 'side effects', as in this case.

If you delete the = from the end of the definition of F.motor, the problem is gone.

If you want to see the value of F.motor, type an extra F.motor=, to get:

Success!
Luc

4-Participant
(To:LucMeekes)

I defined F_motor as a function of phi because I have a major worksheet with phi as a function of time. F_motor will finally calculates the force of a motor depending on time for a swivel movement of 120deg.

Lesson learned from your answer: One should not place an equal sign behind the definition of a formula.

Thank you very much. That helps.

Announcements
Top Tags