spiral_decomp

Function spiral_decomp decomposes a given matrix into a row vector following spiral order.
314 download
Aggiornato 25 ago 2009

Visualizza la licenza

INPUTS
------
A = An n x m matrix (real or complex)

OUTPUTS
-------
y = An (1 x (n * m) ) vector containing the elements of A taking in spiral order.

COMPATIBILITY
-------------
Matlab 7.2 and later

NOTE
-----------
This function utilizes function matrix_perimeter.m

EXAMPLE
------------

>> A=magic(5)

A =

17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9

>> x=spiral_decomp(A)

x =

Columns 1 through 14

17 24 1 8 15 16 22 3 9 2 25 18 11 10

Columns 15 through 25

4 23 5 7 14 20 21 19 12 6 13

Cita come

Athanasios Makris (2025). spiral_decomp (https://it.mathworks.com/matlabcentral/fileexchange/25130-spiral_decomp), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2007b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0