Community Profile

photo

John D'Errico


Retired

4,616 total contributions since 2006

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, and I do attempt to write new tools to put on the File Exchange when I think I can make a contribution.

However, I DON'T answer direct e-mail questions, and I do NOT do homework. In general, your homework is YOUR problem, not mine. Please do NOT e-mail me with your homework problems or student projects. If I was willing to answer your questions, I would very rapidly become overwhelmed, because one question is never just one simple question.

When I'm not doing something with MATLAB, you might find me playing bridge, either in the club or online on BBO.

Professional Interests: MATLAB, numerical analysis, mathematical modeling

Avocational interests: Bridge, woodworking, woodturning

Contact

John D'Errico's Badges

  • Master
  • Revival Level 3
  • 36 Month Streak
  • Promoter
  • Speed Demon
  • CUP Challenge Master
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer
  • Creator
  • Commenter

View all

Contributions in
View by

Answered
Mean of the third dimension
Not entirely sure what you are asking. Do you want to compute the mean for each year for each combination of X and Y? That woul...

32 minutes ago | 0

Answered
I need help with my code using gaussian elimination.
Well, we COULD try to help you solve it using Gaussian elimination, but actually we can't. In fact, nobody can. rank(A) ans = ...

3 hours ago | 0

Answered
MATLAB help with functions
Ok, you know that you have to use .^ to raise to a power. Then look carefully at the error message. What does it tell you? "Err...

7 hours ago | 0

Answered
Invalid use of operator
That you know what your made up syntax means is great. But MATLAB cannot read your mind (yet, the mind reading toolbox has not b...

21 hours ago | 0

Answered
How to smooth an airfoil given through a set of points ?
You cannot fit a spline directly to data of that form. (I don't have your data, so I cannot give an example using it.) But for e...

1 day ago | 1

| accepted

Answered
Equivalent to lsqcurvefit() without the need of the optimisation toolbox
If you are hoping to find someone who provides code in MATLAB here to yield the identically exact same results as lsqcurvefit, i...

2 days ago | 0

| accepted

Answered
Starting with a displacement function, can I use ODE 45 to calculate acceleration?
You cannot differentiate data using a ODE solver. Think of an ODE solver as a numerical integration tool. In fact, you can perf...

2 days ago | 0

| accepted

Answered
A problem that the Ode45 solver did not finish the computations
The answer is (probably) simple. I need point out only a couple of lines of your code that tells me it is so. (In fact, I was al...

3 days ago | 0

Answered
How to use questdlg to ask the user for an action?
Your first problem is you are not using it correctly. The last argument should be one of the choices, to give it a default butt...

3 days ago | 0

Answered
Using a tolerance in X with fzero function (by default the tolerance is evaluated on Y axis).
Actually, if you check the docs for fzero, you will find it uses exactly 5 of the possible options properties - Display, FunValC...

4 days ago | 0

Answered
When using polarplot, why does the argument come before the modulus?
There is no officiially agreed convention, nor can there really be one. Don't expect the author to have used the same convention...

4 days ago | 1

| accepted

Answered
Problems with fmincon for design optimization
Jeff Miller told you this, the first time you asked this question. I'll repeat it, since you don't seem to believe him. You CAN...

5 days ago | 1

Answered
Solving a 2nd order ODE
It is arguably bad notation to have x0 and x_0 as two variables that mean very different things. Confusing as hell, and if you d...

6 days ago | 2

| accepted

Answered
Fit data to sawtooth shape
Too late for an answer for Angela, since I never saw the question a year ago. But a simple model for such a curve will not be to...

6 days ago | 0

Answered
How to perform norm on each row of a matrix?
What is a norm? I assume by norm, you mean the common Euclidean norm, thus the 2-norm. (Other norms will be just as easy for the...

6 days ago | 0

| accepted

Answered
Randi worked in a program I ran 5 weeks ago, today it doesn't-what gives?
Don't write an m-file that is named randi, at least, if you will ever want to use randi. Try this: which randi -all If there i...

6 days ago | 1

| accepted

Answered
Finding Complex root for the nonlinear equation with single variable
Please don't answer your question with a comment. But the answer is, not you cannot use fzero to find a complex root. fzero ONL...

7 days ago | 0

Answered
How to interpolate over long section of bad data?
I had to laugh. No, your problem is not how you defined xq, but more in how you defined x! At least you were thinking in sort of...

7 days ago | 0

Answered
Some insight on mvnrnd function
For once, someone asks a good question, that says they saw something they did not understand, and want to understand what happen...

7 days ago | 2

| accepted

Answered
Non-reproducible solution with non-linear fitting
Do you understand that when you do not specify astart point, that fit uses a RANDOM start point? So why would you expect the sam...

7 days ago | 0

Answered
What is the best way to store different variables into 1 variable?
Use a cell array. Or use a srruct. Either can store anything you put into it. Here, a struct will allow you to store everything...

9 days ago | 0

Answered
Solving system of inequalities and plot in 3-dimensional
Um, just because you have decided that the solution is what you plotted there, does not make it consistent with the set of inequ...

9 days ago | 0

| accepted

Answered
array indices must be positive integers or logical values.
p is sometimes zero. sometimes it is one. how you are creating p is a bit silly, as there is absolutely no reason to use bin2dec...

10 days ago | 0

| accepted

Answered
Problem with the optimization of the Economic MPC
Simple. Your objective function is essenitally constant around the start point, or you provided a start point that actually hap...

10 days ago | 0

Answered
Convert a tetrahedron mesh to triangular mesh or surface mesh.
Easy. Assume that tess is an nx4 array, composed of references into the set of vertices. Then surely is it true that: facets =...

10 days ago | 1

| accepted

Answered
the inverse of spapi function
I think this may be what you are asking for. x = 1:7; y = rand(1,7); S = spapi(5,x,y) S = struct with fields: ...

10 days ago | 0

Answered
How to find the first n postive roots of a function?
You can't do so. Well, not perfectly. Why not? Because I can always provide a function that has roots that are impossible to fin...

10 days ago | 0

| accepted

Answered
46Go on my hardrive ?
It strongly depends on how may toolboxes there are in the two installations. It may also be a function of release, if they are d...

11 days ago | 0

Answered
Why my eigenvalues from (v,d)=eig(k,m) are so close to each other?
You will have 9000 eigenvalues. Some will be small, some larger. How far apart do you think those that are small can realistical...

12 days ago | 0

Answered
numbers and characters in same vector
Store them in a cell array, actually a cell vector. help cell Index a cell array using curly braces, instead of parens. Thus {...

12 days ago | 1

Load more