Thanks, for the Answer,
I have another problem, I want to subtract 1st pixel value in 10x10 matrix from the next to the right as well as to the down pixel. and also to store it in r(x,y) matrix. How, I will do it? Please, this command, is not working properly.
r (x,y) = (aa(x,y)-(aa(x,y)));