Matrix.Create Diagonal<T>(Vector<T>) Method
Constructs a new diagonal matrix.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A diagonal matrix.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static DiagonalMatrix<T> CreateDiagonal<T>(
Vector<T> values
)
Parameters
- values Vector<T>
- A vector containing the diagonal elements of the matrix.
Type Parameters
- T
Return Value
DiagonalMatrix<T>A diagonal matrix.
Remarks
Use this constructor to create a square diagonal matrix with diagonal elements specified by values. The number of rows and columns of the matrix equals the length of values.
Exceptions
Argument | values is null. |