Problem 44648. Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]
Solution Stats
Problem Comments
-
6 Comments
Show
3 older comments
goc3
on 17 Jul 2018
By the way, this problem is essentially identical to https://www.mathworks.com/matlabcentral/cody/problems/1167-matrix-zigzag.
bainhome
on 30 Jul 2018
@goc3: This two problems are not exactly identical, since this problem have a test(the last one) which contains 0 element, this pretty much change everything, if some particular function like nonzeros, etc is considered to be used.
goc3
on 30 Jul 2018
@bainhome: then it's a good thing I added that extra test case to make the problems slightly different.
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
3338 Solvers
-
157 Solvers
-
495 Solvers
-
Diagonal & Anti-Diagonal Matrix: Easy
95 Solvers
-
545 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!