MATLAB Answers

0

Finding the perimeter of a region of a matrix where the matrix is made of zeros and ones

Asked by Zachary Pride on 11 Nov 2019 at 3:16
Latest activity Commented on by Erivelton Gualter on 11 Nov 2019 at 4:57
Write a function, matrix_perimeter, that takes a matrix of ones and zeros as an input. Assume the length and width of each cell is 1. Your function should output the perimeter of the shaded area represented by ones in the input matrix. The matrix above should return 18 for the perimeter. Not real sure how to solve this after make a matrix

0 Answers