Skip to main content
1-Visitor
February 21, 2013
Question

hide units

  • February 21, 2013
  • 4 replies
  • 4348 views

Hello!

example:

Pk=Gk+Gk2+Gk3=10kN+20kN+15kN=45kN

is it possible to show "kN" only at the end?

4 replies

23-Emerald I
February 21, 2013

To do what your example shows requires using the symbolic processor. The symbolic processor doesn't recognize units; to that processor kN is merely another variable name. So I believe the answer to your question is "no."

Now, watch somebody prove me wrong!

24-Ruby IV
February 21, 2013

NUnit.pngOnly so I think:

1-Visitor
February 21, 2013

I thought about some default feature...

ok, I can write equations without units, but I need "middle" answer:

Pk := Gk+Gk2+Gk3 --> 10+20+15 = 45

but now I can get only Pk = Gk+Gk2+Gk3 = 45

25-Diamond I
February 21, 2013

Its absolutely not clear to me what you want to achieve.

In your first post it looked like Gk have unit kN, in your last not!??

It is possible to let it look like in your first post by using default features

HideUnits1.png

I hope you do not want to see something like 10 + 20 + 15 = 45 kN, because this would be definitely wrong!! Units out of thin air - you shouldn't do that magic production of units. Something like (10 + 20 +15) kN = 45 kN is OK, but AFAIK cannot be shown that way with Mathcad in conjunction with your one line definition and explicit symbolic evaluation.

Fortunately you can't do that in Mathcad using default formatting features. You would have to resort to some trickery like Valery's, by defining kN:=1 and later kN:=10^3*N to regain yor kiloNewtons. Nevertheless your variables would have to be redefined to get the necessary units.

Another dirty trick would involve defining a variable which looks like kN (if you don't mind the red error in the definitions) and later resubstitute it so Pk get real unit N/kN. Again you would have to redefine your Gk. All not to be recommended.

HideUnits2.png

19-Tanzanite
February 21, 2013
I hope you do not want to see something like 10 + 20 + 15 = 45 kN, because this would be definitely wrong!! Units out of thin air - you shouldn't do that magic production of units.

I agree.

1-Visitor
February 24, 2013

Although seems weird, it is possible to hide units. For the unit use different style say "User 1" and then modify the font color fo that specific style to white.

hide_unit_mathcad.jpg

24-Ruby IV
February 24, 2013

But we cannot use invisible units with/by explicit operator

And second.

An using invisible variables - one way to the Mathcad House - see http://communities.ptc.com/groups/mathcad-paradoxes