Skip to content
Snippets Groups Projects
Commit ea825ac9 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Meths: added Laplacian

parent 7c1d23b6
No related branches found
No related tags found
No related merge requests found
function dd = gtMathsLaplacian(x)
% FUNCTION dd = gtMathsLaplacian(x)
% Computes the divergence of an n-dimensional vector object.
dims = size(x);
num_dims = numel(dims);
dd = cell(num_dims, 1);
for ii_d = 1:num_dims
padsize = zeros(1, num_dims);
padsize(ii_d) = 1;
dd{ii_d} = diff(padarray(x, padsize, 'both'), 2, ii_d);
end
dd = gtMathsSumCellVolumes(dd);
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment