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.


Decimal currency values to fractional values


  • Fraction = cur2frac(Decimal,Denominator)



Fraction = cur2frac(Decimal,Denominator) converts decimal currency values to fractional values.Fraction is returned as a character vector.


collapse all

This example shows how to convert decimal currency values to fractional values.

Fraction = cur2frac(12.125, 8)
Fraction =


Related Examples

Input Arguments

collapse all

Decimal currency value, specified as a scalar or vector using numeric decimal values.

Data Types: double

Denominator of the fractions, specified as a scalar or vector using numeric values for the denominator.

Data Types: double

Output Arguments

collapse all

Fractional values, returned as a character vector or cell array of character vectors.

See Also


Introduced before R2006a

Was this topic helpful?