How to convert number to text in thousand format?

1 次查看(过去 30 天)
tt = strtrim( string(num2str( [2598.32 256 23125]', '%1.2f')))
tt =
3×1 string array
"2598.32"
"256.00"
"23125.00"
Want result to be
"2,598.32"
"256.00"
"23,125.00"

采纳的回答

Chris
Chris 2021-10-29

更多回答(1 个)

Pete sherer
Pete sherer 2021-11-1
Thanks very much

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by