Community Profile

# John D'Errico

### Retired

4,910 total contributions since 2006

(Please don't contact me. I won't answer questions.) A retired mathematician, numerical animalist, woodworker, bridge player.

View all

Contributions in
View by

Formula used to evaluate polynomial using polyval?
The formula? It is a polynomial. There is no complicated formula. But if you want to know how many of the tools in MATLAB work,...

22 hours ago | 1

How to construct the coefficient matrix（Pentagonal matrix） of five-point difference scheme?
Ok. I'll give you a hint. Constructing a pentagonal matrix STARTS with the function spdiags. A real virtue of spdiags is you wil...

2 days ago | 0

| accepted

Multi-variable interpolation, grids and 2D guessing
Yes. you make yourself clear. This is a nonlinear optimization problem. Sometimes it might be called a calibration problem. Ac...

2 days ago | 0

Fit experimental data to 1D convection diffusion solution
If your goal is to find an anaytical solution, of the form u(x,t), you may need to do some reading. Here, for example, a general...

3 days ago | 1

| accepted

find equation of plane intersect
Ok, first, the solution set is NOT a line. It is a curve, that lives in the (x,y) plane. Next, There is NO plane of intersection...

3 days ago | 1

| accepted

Tight surface meshing of 3D points
Sadly, there is no optimal amount of data, no optimal distribution of points. Only as much data as you can get. The quality of...

4 days ago | 0

finding and removing outlier
Your data does not appear to be normally distributed. Why not? There are no negative values, even though much of your data lies ...

4 days ago | 0

| accepted

random close numbers within an array
I would choose a random integer from 1 to 10000. We can use that as a linear index into the elements of your array, as if the ar...

5 days ago | 0

| accepted

Substitute variable and find maximum of the function
Yes. It is probably best, IF you have some completely general function where you won't tell us the function, to use GA. Ameer is...

5 days ago | 2

How to select non-consecutive values from an array, or generate non-consecutive values?
I'd argue that requiring that the outliers/deviants NOT be consecutive biases your results. But this is easy enough to do. St...

5 days ago | 1

| accepted

Second derivative from a smoothing spline fit
It is important to recognize that IF you have the curve fitting toolbox, then there are various ways to accomplish that you were...

5 days ago | 1

i have a problme
What version of MATLAB are you using? This may be important, since strings in MATLAB only recently allowed double quotes, and th...

5 days ago | 1

How can I index this definite Summation notation?
So many things wrong with the code you wrote. Invalid MATLAB syntax. Just wrongly implementing the formula in multiple places. ...

5 days ago | 0

Finding odd and even values without functions
A = 1:10; A == fix(A/2)*2 ans = 1×10 logical array 0 1 0 1 0 1 0 1 0 1 As long as A is composed of...

6 days ago | 0

the purpose of %f
They seem identical to me. See? The result is exactly the same. ;-) sprintf('%d',pi) ans = '3.141593e+00' sprintf(...

6 days ago | 0

| accepted

How to measur the inclination angle of a palne?
Is there a way? NO. Sorry, but absolutely not since two points do not determine a plane. There are infinitely many planes that ...

6 days ago | 1

| accepted

Whats wrong with this 45 degree line on the plot?
Appearances can be deceiving. Why do you think the line is NOT at 45 degrees? (I know, silly question, but there is a point in i...

6 days ago | 1

| accepted

How can I find zero root for fifth eigenvalue of a matrix
Sadly, the "fifth" eigenvalue of a matrix has no meaning, since the eigenvalues are not assured to arrive in any special order. ...

6 days ago | 0

Constrained polynomial regression with the constraint in coefficient
You are trying to estimate alpha, given a set of data points in the form of (x,y) pairs? Where alpha enters into BOTH coefficien...

6 days ago | 1

Different ways to find limits?
So my response of a simple, succinct "Yes" is not enough? Drat. It did answer the question as asked. Actually, I was thinking a...

6 days ago | 1

Defining Triangular mesh with delaunay and inpolygon ?
Easy peasy. And there is no need to bother with inpolygon here. [x,y] = meshgrid(0:.1:1); xy = [x(:),y(:)]; xy(xy(:,1) > xy(:...

6 days ago | 1

How to convert string "26/7" into a double variable?
Whilst I am one of the people who tends to equate eval with evil... str = '22/7'; eval(str) ans = 3.14285714285714...

6 days ago | 1

Matlab Solve a system of equations for a set of data
You get huge numbers, because you are trying to use symbolic tools here, but with double precision numbers. See what happens her...

7 days ago | 1

| accepted

Composite Boole's rule
Looks like you made a serious effort. First, let me find Boole, not something even most mathematicians would remember off hand. ...

7 days ago | 1

| accepted

How to find intersection between line and curve
Just because the only tool you own is a hammer does not mean every problem must be treated as itf it is a nail. Similarly, just ...

7 days ago | 0

| accepted

Optimisation algorithm ga and fmincon
Athul has already explained it pretty well. Let me try to expand on that, to add some ideas or possibilities. Many nonlinear p...

7 days ago | 1

| accepted

Getting weird results when calculating an integral using rectangle method
Look carefully at what you did. vec1 = pi/180*(0.005:0.01:14.995); Now, what is the stride between elements of that vector? Wh...

8 days ago | 1

| accepted

Finding a number with conditions while using for loop
Why use a loop? ;-) Lets see, the smallest INTEGER with the desired property is 14404. We can get that as: n = 120; >> m = n^...

8 days ago | 1