Sum the 'edge' values of an input matrix (the values along the perimeter).
[1 2 3
4 5 6
7 8 9]
Output = 1 + 2 + 3 + 6 + 9 + 8 + 7 + 4 = 40;
Assumption: Input matrix equal or bigger than 3x3.
how does this work?
"find" can delete,do you agree?
Number of Circles in a Number
Back to basics 9 - Indexed References
We love vectorized solutions. Problem 1 : remove the row average.
Return 'on' or 'off'
Avalaible area: wall construction
Compare two input matrices
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office