Hi Jake,
There are several ways to remove noise from the 2-D data:
1) You can use the "medfilt2" function from the Image Processing Toolbox, which does 2-D median filtering.
>> B=medfilt2(A, [m n], padopt)
The command above performs median filtering of the matrix A in two dimensions. Each output element of the matrix B contains the median value in the m-by-n neighborhood around the corresponding element in the input matrix A.
For more information about the "medfilt2" function, refer to the documentation by executing the following at the MATLAB Command Line:
web([docroot '/toolbox/images/medfilt2.html'])
2) You can also use the "filter2" Matlab Function
This command filters the data in X with the two-dimensional FIR filter in the matrix h. It computes the result, Y, using two-dimensional correlation, and returns the part of the correlation specified by the 'shape' parameter.
Refer to the documentation for more information by executing:
web([docroot '/techdoc/ref/filter2.html'])
Also refer to the following code that illustrates the above concepts:
dfpos = get(0,'DefaultFigurePosition');
figure('Position',dfpos([1 2 3 4]).*[1 1 1.5 1]);
ZN_smooth1=medfilt2(ZN, [15 15],'symmetric');
subplot(1,2,1);
surf(ZN_smooth1);
title('Peaks Surface (2-D median filter applied)')
h = fspecial('average', [10 10]);
ZN_smooth2=filter2(h,ZN,'valid');
subplot(1,2,2);
surf(ZN_smooth2);
title('Peaks Surface(2-D digital averaging filter applied)')
Thanks,
Farouk