What precisely is conv2(A,B,'same')?
显示 更早的评论
Hi All,
I am aware of the following:
- Given two matrices A and B, the matrix
is a submatrix of their convolution
, and I know the definition of
.
and A have the same size.
My question is:
If A is a
matrix and B is
, then what are the values of i and j such that
? That is, where does
start inside the matrix
?
matrix and B is
? That is, where does
start inside the matrix
? Many thanks
4 个评论
Anonymous
2018-11-19
Richard Lockwood
2020-11-5
I believe it is the middle half, from 1/4 to 3/4 of the total interval
Image Analyst
2020-11-6
RIchard, no, not correct. It's not the middle 50%.
'Same' is the part of the output signal where the moving kernel's central element overlaps some part of the signal. So it includes signal where the central element of the moving kernel overlaps an element of the input signal and includes locations where the kernel "falls off" the end of the signal as long as the central element is still over the input signal.
'Full" is the entire output signal, even when the kernel is at the end and only a single element of the kernel overlaps the signal.
'Valid' is where the kernel fully overlaps the signal. So it would not include the ends of the signal where some parts of the moving kernel "fall off" the end of the input signal (they do not overlap).
采纳的回答
更多回答(1 个)
Image Analyst
2018-11-19
0 个投票
Sounds like homework. This is very easy. Just make up arrays on paper, like cut out gridded paper or draw something. Then just physically move the paper along and look where you are. Really, it's trivial.
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!