This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Format Currency

Financial Toolbox™ software provides several functions to format currency and chart financial data. The currency formatting functions are


Converts decimal currency values to fractional values


Converts a value to Financial Toolbox bank format


Converts fractional currency values to decimal values

These examples show their use.

Dec = frac2cur('12.1', 8)

returns Dec = 12.125, which is the decimal equivalent of 12-1/8. The second input variable is the denominator of the fraction.

Str =  cur2str(-8264, 2)

returns the character vector ($8264.00). For this toolbox function, the output format is a numerical format with dollar sign prefix, two decimal places, and negative numbers in parentheses; for example, ($123.45) and $6789.01. The standard MATLAB® bank format uses two decimal places, no dollar sign, and a minus sign for negative numbers; for example, −123.45 and 6789.01.

See Also

| | | | | | | | | | | | | | |

Related Examples

Was this topic helpful?