Qurak

DiamondMatrix

Available

Creates a diamond-shaped matrix of ones.

DiamondMatrix[r]
DiamondMatrix[r, w]
DiamondMatrix[{r1, r2, …}, …]
DiamondMatrix[2] → {{0, 0, 1, 0, 0}, {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 0, 1, 0, 0}}DiamondMatrix[1, 5] → {{0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 1, 1, 1, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0}}

Used in

Topics

Related

All 6300 functions · Use this from an MCP client