version (1.66 KB) by Kenneth Eaton
Converts a numeric value to a monetary value string


Updated Thu, 03 Apr 2008 08:51:08 +0000

View License

A simple utility to create a monetary value string representation of a number.


num2money(200) returns '$200'
num2money(200,'cents') returns '$200.00'
num2money(-200.34) returns '-$200.34'
num2money(2000.34) returns '$2,000.34'
num2money(20000.1023) returns '$20,000.10'

Cite As

Kenneth Eaton (2022). num2money (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!