How to convert number to text in thousand format?

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"

Categories

Products

Release

R2021b

Tags

Asked:

on 29 Oct 2021

Answered:

on 1 Nov 2021

Community Treasure Hunt

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

Start Hunting!