Description Usage Arguments Details Value
View source: R/ddmatrix_special.r
Methods for constructing companion matrices of an n-degree polynomial.
1 2 3 4 5 6 7 |
coef |
Vector of polynomial coefficients, listed in increasing order (by index; see details below). |
type |
"matrix" or "ddmatrix". |
... |
Additional arguments. |
bldim |
blocking dimension. |
ICTXT |
BLACS context number. |
For a degree n polynomial,
x^n + a_{n-1}x^{n-1} + … + a_1x + a_0
its associated companion matrix is a matrix of the form
≤ft[\begin{array}{cccccc} 0 & 0 & 0 & … & 0 & -a_0\\ 1 & 0 & 0 & … & 0 & -a_1\\ 0 & 1 & 0 & … & 0 & -a_2\\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & 0 & … & 1 & -a_{n-1} \end{array}\right]
In the function call, we assume that the argument 'coef
' is ordered
from a_0 to a_{n-1}.
NOTE that we assume that the leading coefficient is 1.
Returns a matrix or a distributed matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.