ee.Array.matrixDiagonal
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tính đường chéo của ma trận trong một cột.
Cách sử dụng | Giá trị trả về |
---|
Array.matrixDiagonal() | Mảng |
Đối số | Loại | Thông tin chi tiết |
---|
this: input | Mảng | Mảng đầu vào. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003ematrixDiagonal\u003c/code\u003e isolates the diagonal elements of a given array and returns them as a new array.\u003c/p\u003e\n"],["\u003cp\u003eThe function operates on the input array (\u003ccode\u003ethis\u003c/code\u003e) without modifying it, producing a new array containing only the diagonal elements.\u003c/p\u003e\n"],["\u003cp\u003eThis method is specifically designed for matrix operations and assumes the input array represents a matrix structure.\u003c/p\u003e\n"]]],[],null,["# ee.Array.matrixDiagonal\n\nComputes the diagonal of the matrix in a single column.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------|---------|\n| Array.matrixDiagonal`()` | Array |\n\n| Argument | Type | Details |\n|---------------|-------|------------------|\n| this: `input` | Array | The input array. |"]]