Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello,
i would like to ask if is any chance to change units in calculations. Details at the picture.
Thank you
Solved! Go to Solution.
Mathcad does not simplify when you assign a variable, so defining M3:=10kN*5m stores the units kN*m, no simplification to Joule is made.
The symbol processor doesn't know anything about units and treats them as unknown variables. So if you symbolically evaluate M3 you will see kN and m and thanks to their names (alphabetical order) in the correct order 😉
If you do a numerical inline evaluation after the assignment (M4:=10kN*5m=...) Mathcad simplifies the units to the default Joule and no matter what you type in in the placeholder after the unit (its just for display purpose) M4 will store that default unit J and a symbolic eval will show that unit.
So to get what you want two methods (apart from tackling the system files as Magnus had shown) come to my mind:
1) Don't use inline evaluations in the assignment regions but show the value of the variable in a separate region next to it. The result is nevertheless not exactly as you had shown:
2) This seems to be the better and more practical one, but it too has its limits (e.g. you have no control over the order the units are displayed at) and can not replace a unit-aware symbolics. Simply use symbolic evaluations instead of numeric ones. At least for your example we get the desired result:
Why don't you post your worksheet?
Maybe you want to change the default unit for answers in "Energy"? Have a look at "Defining Custom Built-In Units" in the Mathcad 15.0 help.
I just made this example and have not figured out why I get 1000 in the denominators.
(And please read the warnings in the help before editing the system files. A small error will stop Mathcad from starting.)
Regards,
Magnus
Mathcad does not simplify when you assign a variable, so defining M3:=10kN*5m stores the units kN*m, no simplification to Joule is made.
The symbol processor doesn't know anything about units and treats them as unknown variables. So if you symbolically evaluate M3 you will see kN and m and thanks to their names (alphabetical order) in the correct order 😉
If you do a numerical inline evaluation after the assignment (M4:=10kN*5m=...) Mathcad simplifies the units to the default Joule and no matter what you type in in the placeholder after the unit (its just for display purpose) M4 will store that default unit J and a symbolic eval will show that unit.
So to get what you want two methods (apart from tackling the system files as Magnus had shown) come to my mind:
1) Don't use inline evaluations in the assignment regions but show the value of the variable in a separate region next to it. The result is nevertheless not exactly as you had shown:
2) This seems to be the better and more practical one, but it too has its limits (e.g. you have no control over the order the units are displayed at) and can not replace a unit-aware symbolics. Simply use symbolic evaluations instead of numeric ones. At least for your example we get the desired result:
Thank you for replay sir