See HTML help file for information about the content (see below in 'Published HTML files').
Copyright (c) 2008 Gabriel Peyre
Maybe tianyu fu is right.When I replaced the codes computing the divergence and the curl by my own codes, it worked.
But the codes really enlightened me.Thank you very much.
@Will Morrison, I think the codes you compute the divergence and the curl are wrong. The correct code is [curlz,cav] = curl(x,y,a(:,:,2),a(:,:,1)); and
d = divergence(x,y,b(:,:,2),b(:,:,1));
Looks like the Hodge Helmholtz decomposition does not work for all vector fields. for example, the curl-free and divergence-free parts in the below example do not have zero curl and divergence.
options.bound = 'per';
mesh_size = 0.1;
xp = -2.05:mesh_size:2.05;
yp = -2.05:mesh_size:2.05;
f = x.^2 - y.^2;
fn = sqrt(fx.^2 +fy.^2);
[a,b] = compute_hodge_decompositon(cat(3,fx./fn,fy./fn),options);
[curlz,cav] = curl(x,y,a(:,:,1),a(:,:,2));
surf(x, y, curlz)
d = divergence(x,y,b(:,:,1),b(:,:,2));
surf(x, y, d)
I try several test files and none of them work, I try test_structure_tensor.m and two other more and I could not make them work. Functions lack documentation within themself. I have to go to a help page to understant the input and outbuts of the functions. I also have the same error that Walid report and many others. If you have the time please correct them this is really a good effort that is not visible since there are some small errors.
I AM trying to run it but it keeps on outputting "Undefined function or method 'getoptions' for input arguments of type 'struct'."
it's really helpful. We do not need to again and again calculate those time-consuming functions
Update of Licence
Add html help files.
Added diagonalization of 3D tensors fields.
Fixed a few bugs.
Added quick gradient computation.
Added non centred differences.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.