Given a matrix of any size, print its elements from the zigzag form of the matrix.

For example,

a=[1 2 3; 
   4 5 6;
   7 8 9]
output = [1 2 3 6 5 4 7 8 9];

Solution Stats

55 Solutions

22 Solvers

Last Solution submitted on May 30, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers22

Suggested Problems

More from this Author174

Community Treasure Hunt

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

Start Hunting!