Problem 364. Matrix spiral
40.0% Correct | 60.0% Incorrect
Last Solution submitted on May 08, 2023
Nikolaos Nikolaou on 13 Dec 2020
This one took me a while :)
Brandon on 8 May 2023 at 19:12
Why are there 0's on the bottom row, and two columns of 0's on the left hand side?
Christian Schröder on 9 May 2023 at 6:10
@Brandon the matrix has to be square, and, according to the problem statement, "has to have the same or more zeros than elevens". If you used e.g. A(1:end-1, 2:end) of the given A, (for n = 8), you'd fail the latter condition.
Solution CommentsShow comments
Problem Recent Solvers78
More from this Author1
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!