1

I use the following code to calculate the force of wind-pressure on a kite - it's simplistic, but gives me what I need. The problem I have is that I can't produce the result to 3 decimal places: N[(1/2)*\[Rho]*v^2*a, 3]] doesn't work. How do I fix this?

Manipulate[
 Grid[{
  {Style[StringForm["\n`` = `` Newtons\n", TraditionalForm[f], 
   N[(1/2)*\[Rho]*v^2*a, 3]], Large]},
  {}, 
  {StringForm["Wind velocity = `` m/s", v]}, 
  {StringForm["Air density = `` m/s", p]}, 
  {StringForm["Kite surface area = `` \\!\(\*SuperscriptBox[\(m\), \(2\)]\)", a]},
  {}
 }], 
{{v, 15, "WIND VELOCITY"}, 0, 25}, 
{{\[Rho], 1.225, "AIR DENSITY"}, 0.9, 1.5}, 
{{a, 0.35, "KITE SURFACE AREA"}, 0.2, 0.5}
]
Richard Burke-Ward
  • 2,231
  • 6
  • 12

1 Answers1

1

From the help of N: "With machine-precision input, the results are always machine precision:". But, instead of N[..,3] you can multiply e.g. by 10, then round and finally divide by 10:

ToString[Round[10 N[(1/2)*\[Rho]*v^2*a, 3]]/10.]]

This produces:

enter image description here

Daniel Huber
  • 51,463
  • 1
  • 23
  • 57