MTM[quorem] - polynomial quotient and remainder
|
Calling Sequence
|
|
q, r := quorem(A, B)
q, r := quorem(A, B, x)
|
|
Parameters
|
|
A
|
-
|
expression or array
|
B
|
-
|
expression or array
|
q
|
-
|
variable
|
r
|
-
|
variable
|
x
|
-
|
(optional) variable
|
|
|
|
|
Description
|
|
•
|
The quorem(A,B,x) function computes the element-wise quotient and remainder of A and B. Each expression in A and B is interpreted as a polynomial of x.
|
•
|
If the optional argument x is omitted, then x is equal to findsym(A,1) if findsym(A,1) is not empty. Otherwise, x is equal to findsym(B,1) if findsym(B,1) is not empty. Otherwise, each expression in A and B must evaluate to an integer. In this last case, the quorem(A,B) function computes the element-wise integer quotient and remainder of A and B.
|
•
|
If A is a scalar, then A is divided by each element of B.
|
•
|
If B is a scalar, then each element of A is divided by B.
|
•
|
When both and A and B are non-scalar, they must be the same size.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
>
|
|
| (9) |
>
|
|
| (10) |
|
|
Download Help Document
Was this information helpful?