Laplacian operator will be equvalient to applying Divergence to the Gradient of the data. However, using the DEL2, DIVERGENCE, GRADIENT function in MATLAB, the results are different between the two methods. For example,
[x, y] = meshgrid(-1:.1:1);A = sqrt(x.^2 + y.^2);% the laplacian
Laplacian_1 = del2(A);% second method to calculate the laplacian
[dx, dy] = gradient(A);Laplacian_2 = divergence(dx, dy);Laplacian_sq_error = (Laplacian_1 - Laplacian_2).^2;
The error is in the order of 1e-2.
Best Answer