MATLAB: How to add commas to numbers using fprintf

commasnumbers

Hello,
How do I add commas to numbers using fprintf? My customer wants me to write out tables and have commas in the numbers to better read it. For instance, 123456789.0 would be written out as 123,456,789.0. Thanks.
Best regards,
Bill Rooker

Best Answer

fprintf cannot do that, but you will find several FEX submissions that can create a string with commas as thousands separators:
If you read the comments to those submissions you will also find several improvements to consider.