Code covered by the BSD License  

Highlights from
matrix_perimeter

Be the first to rate this file! 1 Download (last 30 days) File Size: 1.61 KB File ID: #25129

matrix_perimeter

by Athanasios Makris

 

25 Aug 2009

Function matrix_perimeter extracts the outer elements of a matrix in a clockwise sense.

| Watch this File

File Information
Description

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

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matrix Athanasios Makris 25 Aug 2009 11:39:04
matrix manipulation Athanasios Makris 26 Aug 2009 09:27:20

Contact us at files@mathworks.com