Earth Engine has introduced
noncommercial quota tiers to safeguard shared compute resources and ensure reliable performance for everyone. Noncommercial projects use the Community Tier by default, though you can change a project's tier at any time.
ee.Array.matrixToDiag
Stay organized with collections
Save and categorize content based on your preferences.
Computes a square diagonal matrix from a single column matrix.
| Usage | Returns | Array.matrixToDiag() | Array |
| Argument | Type | Details | this: input | Array | The input array. |
[null,null,["Last updated 2023-10-06 UTC."],[],["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"]]