I'll illustrate my problem on an example
I have a 3x100 matrix and I want to slide a 3x3 filter over it. However, I do not want any of the padding that imfilter would use, such as X, symmetric, replicate, etc., which would yield a 3x100 output. I rather want the sliding window to be only applied when there is real data, such that my output would be 1x (100 - 4).
What would be the most elegant (loopless) way to do this in matlab?
'conv'option (or any others) withimfilter? And you can't just useC = imfilter(A,B);C = C(2,2:end-1);? For such small sizes, that's likely to be very efficient. - horchler