Control decimal places with num2str
Control decimal places with num2str
(OP)
I am displaying values inside of an excel table in mathcad. Simply putting the variable as an input will strip off the unit so I have re-added it by using something similar to:
concat(num2str(theta),"°")
This works great except the value displayed is shown out to 13 decimal places and i only need 2. Any ideas on how to control num2str or for a differant approach altogether?
concat(num2str(theta),"°")
This works great except the value displayed is shown out to 13 decimal places and i only need 2. Any ideas on how to control num2str or for a differant approach altogether?





RE: Control decimal places with num2str
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Control decimal places with num2str
For future reference it looks like this now:
concat(num2str(round(theta,2)),"°")