Community Profile

photo

John D'Errico


Retired

4,038 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

  • Revival Level 3
  • 36 Month Streak
  • Thankful Level 4
  • Ace
  • Knowledgeable Level 4
  • First Answer
  • Promoter
  • Speed Demon
  • CUP Challenge Master
  • Creator
  • Commenter
  • Solver

View details...

Contributions in
View by

Answered
Lorenz Equation || Vector lengths should be the same
First, you need to learn how to preallocate your vectors, and why. That code will be inefficient, because x, y, and z are all be...

4 hours ago | 0

| accepted

Answered
what is time efficiency
The timing for any function in a tool like MATLAB depends on a huge number of things, not all of which are under the control of ...

5 hours ago | 1

Answered
Correction of XYZ data with Interpolation?
Sorry, but you have a few misconceptions here. Interp2 is not an outlier detection algorithm. (What you need for something like...

13 hours ago | 0

Answered
Tangent at a given point to a nonlinear curve
Why not try using a spline? Actually, given that slope discontinuity at the beginning of your curve, you would use pchip. That i...

13 hours ago | 0

Answered
Roots of nonlinear eqn
Well, you did come back and make an effort. There are infinitely many roots. First though, fully use the . operators to get rid...

1 day ago | 0

| accepted

Answered
genetic algorithm with different results at each run
A genetic algorithm is a stochastic algorithm, based on random sampling! What do you seriously expect? No matter what, you will...

1 day ago | 0

Answered
Zeros from a spline (csapi and spapi)
Download my SLM toolbox. Well, not because you need to use the SLM engine itself, but because you want to use slmsolve. The nice...

1 day ago | 0

Answered
matlab polyfit with ax+by=c format
Why would you fit a straight line to that data in the first place? plot(x,y,'o') What did you expect to see? I would suggest...

1 day ago | 1

Answered
lognpdf drawn by parameters from lognfit doenst fit data at all
Look carefully at your data! always do this when you have a problem. Then think about what you see. Bindistd(:,3) ans = ...

2 days ago | 1

Answered
what is the best fit for a set of data?
I think you need to spend some time learning about modeling. Do some reading. Lots of stuff online to be found. You would want t...

3 days ago | 0

| accepted

Answered
why tis matrix is sparse?
You can define anything you want to be sparse if you so desire. So sparse(ones(1000)) will produce a sparse matrix. ;-) But ser...

4 days ago | 2

| accepted

Answered
How to solve this kind of differential equations ?
I don't do consulting via e-mail. I also explicitly ask people not to contact me directly (as you did), as that will just get th...

4 days ago | 0

Answered
Is there a way to see if my code (written in 2018b) will work in another, older version of Matlab, like 2015b?
I'd suggest the simple way is to install the older release. You can have an older release active on your computer. So then you c...

5 days ago | 2

Answered
Sorting numbers in the list without using sort command
Just use sort. ;-) Yeah, I know, it is homework. Not allowed. But you did make a credible effort, and you were close. You have ...

6 days ago | 2

Answered
gauss elimination or inverse
People have said repeatedly that you want to use polyfit. This is the correct answer, IF you need to fit a polynomial. At the s...

6 days ago | 4

| accepted

Answered
How to fit a line through this data "smartly" ?
A serious problem is your data also starts with a strongly nonlinear portion. You essentially need to trim it at both ends. I...

7 days ago | 1

Answered
find roots of determinant
Sadly, too many people misunderstand DET. They think that just because one of the properties of the determinant is thatit is mat...

7 days ago | 0

Answered
How can i create array of 1:2^1000 column size?
Let us be serious. How much memory would you need to store that array? How big is 2^1000? Don't forget to multiply the result by...

7 days ago | 3

Answered
matlab wont work on my mac OS x
Of course it won't run. :) You are trying to install the Windows version of MATLAB. There is a Mac OS X specific version that yo...

8 days ago | 0

Answered
Finding k* which satisfies the equation
It is a really bad idea to want to call a variable k*, since * represents multiplication in MATLAB. gamma is also a poorchoice o...

11 days ago | 0

| accepted

Answered
Generate random sample of points distributed on the n-dimensional sphere of radius R and centred at the origin
What is a "complex random n-dimensional vector"? Does this imply you want to see complex numbers? If so, then what does that mea...

11 days ago | 1

| accepted

Answered
How to plot a function of two variables in MATLAB?
People seem not to recognize this. Not sure why, but it seems a common misperception. A level set is the set of all points where...

12 days ago | 3

| accepted

Answered
strange solution -Newton Raphson
It always makes sense to test your function. Does it make sense? Your starting value is 2400. F1=@(x) 2400 + (1- (sqrt(pi)*er...

12 days ago | 0

Answered
How does MATLAB find Fibonacci for large n extremely fast (27 msecs for 1 millionth)
No. That is not an approximation. It is exact. There are a few ways to compute huge fibonacci numbers. I go into some detail in ...

13 days ago | 1

| accepted

Answered
inverse of mod function
Not that difficult to do. I implemented it in the form of minv.m, in my VPI toolbox. help minv help minv vpi/minv: the ...

13 days ago | 0

Answered
cftool custom equation doesn't work ?
I think I get the issue. I think it is why does 'sin8' work better than does a custom equation fit? The issue with a custom equa...

14 days ago | 2

| accepted

Answered
Unexpected behavior (to me) with quadprog constraintTolerance.
You say you are using quadprog with fmincon. But in fact, you are apparently not using quadprog then, but fmincon. I suppose you...

14 days ago | 1

Answered
Can we check points are in straight line
The others have offered various solutions that CAN work, but they have flaws. In fact, many solutions can be caused to fail if y...

14 days ago | 1

Answered
How I can create a three dimensional succession
As simple as one line like this: freq = reshape((5:0.5:15)*1e9,1,1,[]); As you can see, it has the desired shape. size(freq) ...

15 days ago | 1

Answered
Can I solve a special system of implicit functions by using the command "fsolve"
I think Walter misread things, or perhaps did not notice something important.. While the -.5 is a square root indication, the pr...

16 days ago | 0

Load more