Rank: 4 based on 3471 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
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 92 16
  • 4.66667
4.7 | 6 ratings
29 Apr 2014 polyfitn Polynomial modeling in 1 or n dimensions Author: John D'Errico polyfit, modeling, regression, linear regression, approximation, function 279 43
  • 4.95833
5.0 | 24 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 157 101
  • 5.0
5.0 | 52 ratings
29 Jan 2014 Moving window standard deviation A (fast) windowed std on a time series Author: John D'Errico standard deviation, std, window, filter, movingavg 99 16
  • 4.72727
4.7 | 11 ratings
30 Oct 2013 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 50 17
  • 5.0
5.0 | 8 ratings
Comments and Ratings by John View all
Updated File Comments Rating
09 Aug 2014 inpaint_nans Interpolates (& extrapolates) NaN elements in a 2d array. Author: John D'Errico

Citing files on the FEX has come up often, enough so that we had a discussion about it, and came up with several schemes that seem viable. Find them at this link:

http://blogs.mathworks.com/community/2010/12/13/citing-file-exchange-submissions/

All you need do is modify the citation style you prefer to fit inpaint_nans, instead of gridfit.

09 Aug 2014 ColorBrewer: Attractive and Distinctive Colormaps The complete palette of ColorBrewer colormaps. Simple selection by scheme name and map length. Author: Stephen Cobeldick

A very nice submission to upgrade your figures for good viewing by all viewers.

Excellent help and examples for use. I found the colorbrewer.org web site interesting too.

07 Aug 2014 ismywiferight.zip This code gives an out put 'yes' regardless of the input. Author: Vineet

Oh, come on, give me a break.

05 Aug 2014 RMSEARCH Randomly multiply started optimizations for global problems Author: John D'Errico

This is a basic of MATLAB. You need to do the same thing for ANY optimizer, for any numerical integration method, etc.

What happens when you try passing in fun as an argument? If you call it like that:

[xfinal,ffinal,exitflag,xstart] = rmsearch(fun,'fmincon',...);

Look at it from the point of the MATLAB interpreter. MATLAB sees fun as a function, that it tries to execute immediately. It would then try to pass the result of that function call to rmsearch.

But that is NOT what you want to do. You want to pass in the function itself into rmsearch. You do this most easily via function handles, the things with an @ symbol in front of a function name. They also let you create a function on the fly. (Read about function handles in the help.)

So in this case, what you had to do was this:

[xfinal,ffinal,exitflag,xstart] = rmsearch(@fun,'fmincon',...);

28 Jul 2014 bisection bisection root finding code Author: osman onur g├╝rler

Poor, even disregarding that the error messages are unreadable to most people.

It starts with clc, clear all. Yes, this is homework, but for anyone to use it in any serious way, it is not a function, but a script. So clearing the person's workspace makes this useless, and in fact, just a bit malicious for actual use. (You need to recognize that what is acceptable for homework is in fact terrible for anyone who will do real work.)

Of course, why anyone would use bisection instead of fzero is beyond me, so I seriously doubt that anyone will use it for more than homework.

Looking at the code, it is also moderately poor. WHY WOULD YOU USE SYMS? Please tell me why anyone needs to create a symbolic function, then use subs to evaluate the function. LEARN TO USE FUNCTIONS! So learn about anonymous functions, function handles, feval, even inline functions are an option.

If all this is is a teaching tool, because it really is a homework assignment, it does not have any internal comments. Of course, most people could not read them anyway.

The cariable names are poorly chosen, c,k,m, etc. USE self documenting variable names. You don't get charged per character of code, but you WILL find that readable code makes it easier to debug. ANd most people will find bugs in their code at some time or another. So learn to write readable code!

The interface is poor, with inputs to bring in everything. Ugh, useless, even as homework. No error checks.

Oh, the code again ... There is no check for number of iterations, so this code could potentially go into an infinite loop.

Overall, poor, even as homework.

Comments and Ratings on John's Files View all
Updated File Comment by Comments Rating
18 Aug 2014 HPF - a big decimal class High precision floating point arithmetic, a new class written in MATLAB Author: John D'Errico Shaoyang

12 Aug 2014 fminsearchbnd, fminsearchcon Bound constrained optimization using fminsearch Author: John D'Errico Sani

12 Aug 2014 polyfitn Polynomial modeling in 1 or n dimensions Author: John D'Errico JinSun

Incredible. Thank you for your contribution!

11 Aug 2014 distance2curve Find the closest point on a (n-dimensional) curve to any given point or set of points Author: John D'Errico Genevieve

09 Aug 2014 inpaint_nans Interpolates (& extrapolates) NaN elements in a 2d array. Author: John D'Errico D'Errico, John

Citing files on the FEX has come up often, enough so that we had a discussion about it, and came up with several schemes that seem viable. Find them at this link:

http://blogs.mathworks.com/community/2010/12/13/citing-file-exchange-submissions/

All you need do is modify the citation style you prefer to fit inpaint_nans, instead of gridfit.

Contact us