File Exchange

image thumbnail

Toolbox diffc

version 1.2 (1.18 MB) by

A toolbox to perform differential calculus on a matrix.

12 Downloads

Updated

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 (8)

W Z

W Z (view profile)

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.

W Z

W Z (view profile)

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;
[x,y]=meshgrid(xp,yp);
f = x.^2 - y.^2;
[fx,fy]=gradient(f);
fn = sqrt(fx.^2 +fy.^2);
[a,b] = compute_hodge_decompositon(cat(3,fx./fn,fy./fn),options);
figure();
[curlz,cav] = curl(x,y,a(:,:,1),a(:,:,2));
surf(x, y, curlz)
figure();
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

Updates

1.2

Update of Licence

1.1

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

Win prizes and improve your MATLAB skills

Play today

toolbox_diffc/

toolbox_diffc/tests/

toolbox_diffc/toolbox/