Spiral Out - 02 - MATLAB Cody - MATLAB Central

Problem 45453. Spiral Out - 02

Difficulty:Rate
An array is given. Convert it into a spiral matrix.
For example, a=1:27;
out=[21 22 23 24 25 26
20 7 8 9 10 27
19 6 1 2 11 0
18 5 4 3 12 0
17 16 15 14 13 0
0 0 0 0 0 0]
add necessary amount of zeros to fill in the remaining positions.
Note - spiral() is forbidden.

Solution Stats

31.25% Correct | 68.75% Incorrect
Last Solution submitted on May 16, 2023

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
3

Problem Recent Solvers10

Suggested Problems

More from this Author165

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page