ZigZag Scan any N*N Matrix (bloc of image)

Version 2.0 (1.76 KB) by Said BOUREZG
ZigZagscan.m Transform an matrix to a vector using Zig Zag Scan.
917 Downloads
Updated 1 May 2017

View License

ZigZagscan Transform an matrix to a vector using Zig Zag Scan.
%
% VECT = ZIGZAGSCAN(MATRIX) reorganize the input Matrix and output it as a vector.
%
% Example:
% X=[1 2 3
% 4 5 6
% 7 8 9]
%
% X =
% 1 2 3
% 4 5 6
% 7 8 9
%
% ZigZagscan(X)=
% 1 2 4 7 5 3 6 8 9

Cite As

Said BOUREZG (2024). ZigZag Scan any N*N Matrix (bloc of image) (https://www.mathworks.com/matlabcentral/fileexchange/56332-zigzag-scan-any-n-n-matrix-bloc-of-image), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
2.0

For more description