Problem 52050. Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the elements.
Given a 3x3 kernel matrix K, find its convolution with a 3x3 subsection of a given matrix A. The subsection will be indicated by r and c, the row-column location of the top left corner element.
For example, let K = [ ], A = [ ] and r = 2, c = 3. Then the relevant 3x3 subsection of A starts at row 2 and column 3, i.e. with the element 7. Thus, the 3x3 subsection is S = [ ]. The element-wise product of S with the kernel K is [ ], and the convolution y is the sum of these elements, making y = 45.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers27
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
48173 Solvers
-
Extract leading non-zero digit
2116 Solvers
-
Compute a dot product of two vectors x and y
977 Solvers
-
Vectorize the digits of an Integer
316 Solvers
-
952 Solvers
More from this Author52
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!