Problem 56383. Create spiral matrices
Create a matrix of a given size with sequential elements spiraling inward.
For matrix height m and width n, the output should be an m-by-n matrix with elements ranging from from 1 to m*n in a rectangular spiral pattern with 1 in position (1,1) and the first 'leg' of the spiral progressing down the first column, i.e., the left column of the output has elements 1:m.
Solution CommentsShow comments
Problem Recent Solvers3