-
2 Comments
Adr Paw
on 10 Aug 2016
it's very nice solution, but sadly it's not general solution
Peng Liu
on 11 Aug 2016
My original objective was to reduce the Cody size as much as possible. You can make this solution general by using y = discretize(spiral(n), [0 1:2:n].^2+.5) or y = discretize(spiral(n), [0 1:2:n].^2, 'IncludedEdge','right'), which has a higher size though.
Suggested Problems
-
Given two arrays, find the maximum overlap
1582 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
832 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
382 Solvers
-
671 Solvers
-
508 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!