Rank: 4 based on 4074 downloads (last 30 days) and 52 files submitted
photo

John D'Errico

E-mail
Company/University
Retired

Personal Profile:

Mainly retired from Eastman Kodak. (Of course, Kodak itself is now semi-retired. I don't think I had any influence in that.) I still write MATLAB code as I find something interesting, but I DON'T answer your questions, and I do NOT do homework. Your homework is YOUR problem, not mine. Do NOT e-mail me with your homework problems or student projects. When I'm not doing something with MATLAB, you might find me playing bridge.

Professional Interests:
Bridge, MATLAB, numerical analysis, mathematical modeling

 

Watch this Author's files

 

Files Posted by John View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
16 Oct 2014 movingstd(x,k,windowmode) A (fast) windowed std on a time series Author: John D'Errico movingavg, standard deviation, std, window, filter 145 18
  • 4.75
4.8 | 12 ratings
14 Oct 2014 HPF - a big decimal class High precision floating point arithmetic, a new class written in MATLAB Author: John D'Errico hpf, multiple precision, big decimal, floating point, arithmetic, mathematics 77 20
  • 5.0
5.0 | 9 ratings
23 May 2014 Screenshot A suite of minimal bounding objects Suite of tools to compute minimal bounding circles, rectangles, triangles, spheres, incircles, etc. Author: John D'Errico miminum, bound, bounding, circle, rectangle, triangle 105 18
  • 4.71429
4.7 | 7 ratings
29 Apr 2014 polyfitn Polynomial modeling in 1 or n dimensions Author: John D'Errico polyfit, modeling, regression, linear regression, approximation, function 282 43
  • 4.96
5.0 | 25 ratings
29 Apr 2014 Screenshot SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico spline, splines, cubic, hermite, breaks, knots 199 103
  • 5.0
5.0 | 52 ratings
Comments and Ratings by John View all
Updated File Comments Rating
24 Oct 2014 Surface Fitting using gridfit Model 2-d surfaces from scattered data Author: John D'Errico

Evgheny - If you seriously need to fit such a surface in spherical coordinates, I might be able to help you out with a separate, un-posted toolbox that is capable of fitting a surface in spherical coordinates. You would need to contact me directly.

21 Oct 2014 Log of factorial of large numbers computes log10 of the factorial Author: Yvan Lengwiler

For those who don't want to remember the use of gammaln as implemented inside, this adds a few extras too. It is complete, with good help.

20 Oct 2014 A suite of minimal bounding objects Suite of tools to compute minimal bounding circles, rectangles, triangles, spheres, incircles, etc. Author: John D'Errico

Hi Tom,

The problem is as you point out, that the insphere code uses a dot product to find the distance to each facet. Then it is a simple call to linprog, with one slack variable for each facet.

A similar idea for edges though trips up becasue each edge has two normals. So then the distance to each edge is now the sqrt of the sum of squares of a pair of dot products. While I can avoid the sqrt, such a formulation would involve quadratic equality constraints for each slack variable. Clearly this is not solvable by linprog, or even quadprog. Fmincon would be needed, so a bit more nasty of a problem using a similar formulation to the one in insphere. Certainly one could use the existing insphere code to find decent starting values for such an iterative solution, but it is still a bit more work.

I'll need to think if there is another scheme that might apply.

John

16 Oct 2014 movingstd(x,k,windowmode) A (fast) windowed std on a time series Author: John D'Errico

Uploaded a new version to replace strmatch

14 Oct 2014 HPF - a big decimal class High precision floating point arithmetic, a new class written in MATLAB Author: John D'Errico

Yes, that was indeed a bug, now fixed. I'm uploading a new version now (to appear today I hope.)

So with the new release, in 100 digits of precision...

exp(hpf('-2.22222222222222222222222222e-137',100))
ans =
1

And in 200 digits, we see a tiny difference from 1, as expected.

exp(hpf('-2.22222222222222222222222222e-137',200))
ans =
0.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997777777777777777777777777780000000000000000000000000000000000000

This release adds one new toy: the rat function, implemented for hpf. So for a 100 digit rational fraction approximation to pi...

[N,D] = rat(hpf('pi',100),hpf('1e-101'))
N =
394372834342725903069943709807632345074473102456264
D =
125532772013612015195543173729505082616186012726141

N/D
ans =
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068

hpf('pi',100)
ans =
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068

Comments and Ratings on John's Files View all
Updated File Comment by Comments Rating
24 Oct 2014 putvar, uigetvar Move (get or put) variable(s) directly between a function workspace and the base workspace Author: John D'Errico Taylor

Very nice. Would love to see (1) an option in putvar (e.g. '-all') telling it to pass all variables, and (2) an option in putvar (e.g. '-struct',structname) telling it to pass the specified variable(s) inside a specified struct (structname in my example).

24 Oct 2014 inpaint_nans Interpolates (& extrapolates) NaN elements in a 2d array. Author: John D'Errico Roth, Jan-Philipp

This has saved my day. Thank you!

24 Oct 2014 Surface Fitting using gridfit Model 2-d surfaces from scattered data Author: John D'Errico D'Errico, John

Evgheny - If you seriously need to fit such a surface in spherical coordinates, I might be able to help you out with a separate, un-posted toolbox that is capable of fitting a surface in spherical coordinates. You would need to contact me directly.

23 Oct 2014 Surface Fitting using gridfit Model 2-d surfaces from scattered data Author: John D'Errico Evgheny

Thanks, function does do its job great!

Does anyone know alternative of this function for closed surface (sphere-like).
If I try this function with spherical coordinates, it works fine, but there are problems with the seam (line of joint)

22 Oct 2014 inpaint_nans Interpolates (& extrapolates) NaN elements in a 2d array. Author: John D'Errico Yorum

Contact us