Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eArray.matrixToDiag()\u003c/code\u003e constructs a square diagonal matrix using elements from a single-column input array.\u003c/p\u003e\n"],["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eThe resulting diagonal matrix is returned as a new array.\u003c/p\u003e\n"]]],["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"],null,["Computes a square diagonal matrix from a single column matrix.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------|---------|\n| Array.matrixToDiag`()` | Array |\n\n| Argument | Type | Details |\n|---------------|-------|------------------|\n| this: `input` | Array | The input array. |"]]