File Exchange

image thumbnail

Toolbox diffc

version 1.2 (1.18 MB) by

A toolbox to perform differential calculus on a matrix.



View License

See HTML help file for information about the content (see below in 'Published HTML files').

Copyright (c) 2008 Gabriel Peyre

Comments and Ratings (6)

tianyu fu

@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)

Maider Marin

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.

Sheraz Khan

Walid Kamoun

I AM trying to run it but it keeps on outputting "Undefined function or method 'getoptions' for input arguments of type 'struct'."

Truc Phan

it's really helpful. We do not need to again and again calculate those time-consuming functions



Update of Licence


BSD Licence

Add html help files.

Added diagonalization of 3D tensors fields.

Fixed a few bugs.

GPL license.

Added quick gradient computation.

Added non centred differences.

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video