| Financial Toolbox | ![]() |
Formatting Currency
The Financial Toolbox 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.
returns Dec = 12.125, which is the decimal equivalent of 12-1/8. The second input variable is the denominator of the fraction.
returns the string ($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; e.g., ($123.45) and $6789.01. The standard MATLAB bank format uses two decimal places, no dollar sign, and a minus sign for negative numbers; e.g., -123.45 and 6789.01.
| Determining Dates | Charting Financial Data | ![]() |