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.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Right-array division (./)

`c = rdivide(a,b)`

c = a./b

`c = rdivide(a,b)`

and `c = a./b`

perform
right-array division by dividing each element of `a`

by
the corresponding element of `b`

. If inputs `a`

and `b`

are
not the same size, one of them must be a scalar value.

The numerator input `a`

can be complex, but
the denominator `b`

requires a real-valued input.
If `a`

is complex, the real and imaginary parts of `a`

are
independently divided by `b`

.

The following table shows the rules used to assign property
values to the output of the `rdivide`

function.

Output Property | Rule |
---|---|

`Signedness` | If either input is If both inputs are |

`WordLength` | The output word length equals the maximum of the input word lengths. |

`FractionLength` | For |

The following table shows the rules the `rdivide`

function
uses to handle inputs with different data types.

Case | Rule |
---|---|

Interoperation of `fi` objects and built-in
integers | Built-in integers are treated as fixed-point objects. For
example, |

Interoperation of `fi` objects and constants | MATLAB |

Interoperation of mixed data types | Similar to all other `ScaledDouble` `Fixed-point` Built-in `double` Built-in `single`
When both inputs are |

In this example, you perform right-array division on a 3-by-3
magic square of `fi`

objects. Each element of the
3-by-3 magic square is divided by the corresponding element in the
3-by-3 input array `b`

.

a = fi(magic(3)) b = int8([3 3 4; 1 2 4 ; 3 1 2 ]) c = a./b

The `mrdivide`

function outputs a 3-by-3 array
of signed `fi`

objects, each of which has a word
length of 16 bits and fraction length of 11 bits.

a = 8 1 6 3 5 7 4 9 2 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 11 b = 3 3 4 1 2 4 3 1 2 c = 2.6665 0.3335 1.5000 3.0000 2.5000 1.7500 1.3335 9.0000 1.0000 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 11

Was this topic helpful?