[Scilab-users] Digit Grouping in msprintf?
sgougeon at free.fr
sgougeon at free.fr
Mon Nov 6 16:03:49 CET 2017
Hi Richard,
Are you sure that a relative accuracy of 5e-8 of your result is relevant/actual/significant?!
(.f displays 6 decimal digits after the dot).
If yes, and if
msprintf('%5.2f GWh',2725977/1e6)
does not match your actual data and relative accuracy, AFAIK there is no way with the Scilab C format to group digits.
So, you may post-process the resulting string with some strsplit(s,..) and strcat(s, " ") calls.
Tuning the space's width is mainly/only possible with a LaTeX rendering on graphics.
HTH
Samuel
----- Mail original -----
De: "Richard llom" <richard.llom at gmail.com>
À: users at lists.scilab.org
Envoyé: Jeudi 2 Novembre 2017 15:48:49
Objet: [Scilab-users] Digit Grouping in msprintf?
Hey,
is it possible to have this
msprintf('%.f kWh',2725977)
output something like "2.725.977 kWh" or even better "2 725 977 kWh" (with
thin spaces)?
Thanks
richard
--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
More information about the users
mailing list