Skip to main content
1-Visitor
May 7, 2012
Question

How to do symbolics like 2.5*in+9*ft--->XX*mm+YY*mm

  • May 7, 2012
  • 9 replies
  • 3615 views

Hi,

This is a question from customer, asking about how to do symbolics like 2.5*in+9*ft--->XX*mm+YY*mm?

That means customer wants to show the unit changed in the progress, not only getting the final results such as 2.5*in+9*ft=2806.7mm

I have tried using substitue, but can't get the expected units in the progress as followings:

So can you help doing the expected behaivor?

Best Regards

Wind

9 replies

12-Amethyst
May 7, 2012

Can redefine units as a variable, suggest changing name though:

tmp11.gif

19-Tanzanite
May 7, 2012

The symbolic processor knows nothing about Mathcad's built-in units. The symbolic processor treats them as undefined variables, just like any other undefined variable. You can play around with defining the units yourself, as Wayne suggests, or you can play around with substitute, but that's all. I can't comment on why substitute didn't do what you want because you didn't post a worksheet. You also created this as a document rather than a discussion thread, so nobody else can post worksheets either.

WindWang1-VisitorAuthor
1-Visitor
May 8, 2012

xx.png

Hi Richard,

As you can see from the above picture, I can only get the final result 2806.7mm, but can't get what I wanted XX*mm+YY*mm=2806.7mm

WindWang1-VisitorAuthor
1-Visitor
May 8, 2012

Hi Wayne,

Thanks for you idea, I have another question below.

y.png

12-Amethyst
May 8, 2012

Don't think you have any control, Mathcad is going to use the base unit m.  The had to choose, and that's what they choose.

WindWang1-VisitorAuthor
1-Visitor
May 8, 2012

It seems the reason is not about the base unit m. See below.

t.png

19-Tanzanite
May 8, 2012

The symbolic processor does not understand units. It just sees mm as an undefined variable, like any other undefined variable.

19-Tanzanite
May 8, 2012
Thanks for you idea, I have another question below.

y.png

                   

Because of the inline evaluaton it sees "m" attached to the IN and FT values. It sees "m", which is what is stored internally, regardless of what you type in the unit placeholders in the inline evaluations. And to the symbolic processor, "m" is just another undefined variable.

WindWang1-VisitorAuthor
1-Visitor
May 8, 2012

Thanks