Hey thanks for the code,
but the error that persists is that in the noisy data again the fitting is coming out to be wrong. It fits the co-ordinates the data for noisy data as well.
I am implementing the code on a Image processing method.
Just to update, I think the reason the jacobian_error_3d_double crashed is becasue I run out of free memory and that's why malloc return a null pointer.
Using coarser spacing (4x4x4 instead of 2x2x2) results in correct execution of the function (becasue less memory is used).
Also note, that Matlab return more available threads(8) than actually supported(4), and runs slower on 8 threads than on 4 threads
jacobian_error_3d_double crashes on win7 64bit, Intel i7-3632QM cpu (quad core), 16GB RAM.
Compiled with Visual Studio 2013.
Input volume was about 600x500x60.
I managed to get it to run by setting Nthreds=1 indide the c code and re-compiling.
Of course it takes forever to run (and almost 15GB of RAM), but at least it runs...
There seems to be a problem with the threads and mallocs calls.