中文说明:使用matlab语言编写的zigzag程序,用于Z字形扫描。在图像编码的算法中,需要将一个给定的方形矩阵进行Z字形扫描(Zigzag Scan)。请实现一个Z字形扫描的程序,给定一个n×n的矩阵,输出对这个矩阵进行Z字形扫描的结果。
English Description:
Zigzag program written using MATLAB language, for zigzag scanning. In image coding algorithm, you need to square matrices of a given by ZIGZAG scanning (Zigzag Scan). Please implement a zigzag scanning programs, given an NxN matrix, zigzag scan output of the Matrix result.