ee.Array.matrixToDiag
Computes a square diagonal matrix from a single column matrix.
Usage | Returns |
---|
Array.matrixToDiag() | Array |
Argument | Type | Details |
---|
this: input | Array | The input array. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`Array.matrixToDiag()` constructs a square diagonal matrix using elements from a single-column input array."],["The function takes an array as input and positions its elements along the diagonal of a new, square matrix, with all off-diagonal elements set to zero."],["The resulting diagonal matrix is returned as a new array."]]],["Transforms a single column matrix into a square diagonal matrix. The input is a one-dimensional array, and the function returns a new array representing the square diagonal matrix. The `matrixToDiag()` method, when applied to the input array, performs this conversion. The input array serves as the diagonal elements of the resulting square matrix.\n"]]