if I understand your question clearly...are you saying how to create a filter kernel 3x3 then its very simple.just follow the below Matlab commands which I have written below
here you need to give your input signal.you can also try checking by using different co-efficient values and also by increasing the size of the filter.