Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not allowed in your function. Also, loops are not allowed.

Solution Stats

596 Solutions

110 Solvers

Last Solution submitted on Jan 14, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers110

Suggested Problems

More from this Author44

Problem Tags

Community Treasure Hunt

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

Start Hunting!