matrix_perimeter
This is a utility function.
It may be used for matrix decompositions or extraction of boundaries in 2d rectangular domains.
INPUTS
------
A = An n x m matrix (real or imaginary)
OUTPUTS
-------
x = Row vector of the elements of the matrix that exist in the perimeter, taken in a clockwise sense
A = An (n-2)x(m-2) matrix, same as input matrix, without its elements existed in the perimeter (The input matrix is decomposed within the function)
COMPATIBILITY
-------------
Matlab 7.2 and later
EXAMPLE
-------
>> A=magic(4)
A =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
>> [x,B]=matrix_perimeter(A)
x =
16 2 3 13 8 12 1 15 14 4 9 5
B =
11 10
7 6
Cite As
Athanasios Makris (2024). matrix_perimeter (https://www.mathworks.com/matlabcentral/fileexchange/25129-matrix_perimeter), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox > Descriptive Statistics and Visualization >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |