Skip to main content
1-Visitor
May 25, 2016
Question

How to reduce a number of digits after a decimal point in a solve for variable function

  • May 25, 2016
  • 6 replies
  • 5220 views

Hi,

I am having a problem with the form of outcome in the Solve for variable function. I have tried to change a format of results but unsuccessfully. Could anyone help me out with a way to reduce a number of digits after a decimal point(as illustrated in the pic below).

Capture.JPG

Kind regards,

Maciej

6 replies

24-Ruby IV
May 25, 2016

Use please the float operator!

19-Tanzanite
May 25, 2016

Do NOT use the float keyword for this! The float keyword changes the precision of the calculations, not just the precision of the displayed result. This suggestion keeps coming up, so maybe the big, red, underlined statement will help the memory

soap+box.gif

21-Topaz II
May 25, 2016

You should reset all the constants and all the variables before the formula. For example: Ca=Ca , Ned=Ned, etc....

25-Diamond I
May 25, 2016

I guess you are looking for a numeric result, right?

Using the float modifier is dangerous as it does not only affect the display but the whole calculations which may get inaccurate.

Furthermore the output looks undesirable because, as you may have noticed, the units are not simplified. This is because of the fact, that the symbolics does not know anything about units, it can't simply MPa*mm^2 to N as MPa, mm and N are completely different, unknow variables from the symbolics point of view.

So the best thing you can do as I see it is to leave it at that, if you don't want to show the expression, you may hide it in a collapsed area.

And below that region simply type C.NA= and you will see a simple numeric 2 x 1 vector in Newton.

In case you really are looking for a symbolic result, you can do as F.M. had suggested and furthermore replace the 0.003 by 3/1000

WE

23-Emerald IV
May 25, 2016

The symbolic solver is rather powerful, but uses floating point results with much decimals if you allow it to.

Wherever possible make sure your input data consists of EXACT numbers, 3/1000 instead of 0.003 etc. or else raplace floating point numbers by a symbol.

But if you want to take the best out of it, do as shown below:

Bear in mind that the symbolic solver does not know about units!!!. it treats 33mm as two values (33 and mm) multiplied, where mm is an unknown.

Success!
Luc

19-Tanzanite
May 25, 2016

"Format", "Result", check the checkbox "Apply to symbolic results".