Documentation

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.

cur2frac

Decimal currency values to fractional values

Syntax

  • Fraction = cur2frac(Decimal,Denominator)
    example

Description

example

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

Examples

collapse all

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

Fraction = cur2frac(12.125, 8)
Fraction =

12.1

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?