This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Willion Bird
on 19 Jun 2019
function a = bullseye(n)
a = 1;
for i = 2:(n+1)/2
a = padarray(a, [1,1], i, 'both');
end
end
Why doesn't this function work?
Adria de Juan Garcia
on 31 Mar 2021
That's probably because padarray() needs Image Processing Toolbox which is not implemented in Cody.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!