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.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Solution 475843
This really violates the spirit of the problem.
I know... :-p
it was quick and dirty. I will come again to solve it right. ;-)