Community Profile # John D'Errico

### Retired

4.535 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

#### John D'Errico's Badges

View details...

Contributions in
View by

How a solution depends on a variable
Using gamma as the name of a variable is a bad idea. Regardless,... Where is the problem? Just substitute a range of values for...

circa 11 ore ago | 0

Higher dimensional space of data
You want to project data into a HIGHER dimensinal space? Trivial. For example... data = rand(10,1); So data represents a set o...

circa 12 ore ago | 0

symbolic equation Empty sym: 0-by-1
When solve returns an empty result, that means it can find no analytical solution. And since you have symbolic parameters in th...

circa 12 ore ago | 0

| accepted

How can I plot a sin (x^2) function
First, there is ABSOLUTELY NO reason to predefine x as a sym. So this line is completely irrelevant: syms x; When you do creat...

1 giorno ago | 1

| accepted

Fixing code to do bisection properly
Um, look closely at the code that you wrote. Hey, it is your code. You should know what is in it. First, what does your functio...

1 giorno ago | 0

difference between convolution code and 'conv' function
No difference at all, IF you are asking about the difference between a hand written code to do a numerical convolution computati...

1 giorno ago | 0

| accepted

clock speed and cores
In general, this is impossible to answer. For ultimate speed, you want many cores, a fast clock speed, fast disk access, and a g...

2 giorni ago | 0

Bisection method not working. Is my code heading in the right direction?
I had to laugh, as I recognized your coding style from a previous question. Then I remembered your name. Note that not(abs((end...

2 giorni ago | 0

Variance between two vectors
The variance between two vectors is something that seems to be a bit ambiguous in meaning. I can think f at east a couple of way...

2 giorni ago | 0

why is my Fixed point iteration method only giving me first iteration. (i included info at the bottom of code and the next few iterations answers)
Think about it. Does p EVER change? Why not? How would you make it change? Inside the loop, we see only this: N=N+1; F=p; p...

3 giorni ago | 0

| accepted

Conversion to function_handle from double is not possible.
LOOK AT THE ERROR MESSAGE. Think about what it tells you. Error in RegulaFalsi_Mod (line 21) f(a) = (1/k)*f(a); What ...

3 giorni ago | 1

optimization toolbox
The optimization toolbox has existed for MANY years before 2006. I had a copy in my 1988 release. (Back then, it was called a ve...

4 giorni ago | 1

Can PLSregress handle no intercept
It is NEVER a good idea to hack toolbox code. The exceptions are where you know enough to be able to write the modified algorit...

4 giorni ago | 0

How can I count the largest number of repeated numbers in a double?
First, this is NOT a double vector. 00000000101100000011110000110000 It might be a string. But if you tried to write that vec...

4 giorni ago | 1

A particular differential equation... why can't I solve it?
Easier than you might think to solve, even with pencil and paper. But sometimes a computer won't see the trick, at least, not wi...

4 giorni ago | 0

| accepted

could anyone help me to solve the issue
Easy enough. Just use setdiff. A=[2 3; 1 4; 2 4; 3 4]; That is, ... B = A; cind = [3 4]; for i ...

5 giorni ago | 0

| accepted

Main diagonal operations problem
Easy enough, it seems. First, determine the diagonal elements. x = diag(rand(1,4)*.7 + .3); Next, you need to choose the other...

5 giorni ago | 2

The accuracy of cumtrapz (numerical integration)????
This is something covered in any basic class that talks about numerical methods. (And why are you using methods about which you ...

5 giorni ago | 2

| accepted

How to make a variable an even number?
If you just want to check if a variable X is an even number, then just check the value of mod(x,2). If the result is zero, then ...

6 giorni ago | 1

Fitting of raw data
You don't have any simple model that you can use, at least, you have not suggested any. And, even if somebody suggests using pol...

6 giorni ago | 0

I don't know if matlab is calculating this properly
MATLAB is calculating what it calculated properly. The issue is, you told it to calculate the wrong thing. Computers are sooooo ...

7 giorni ago | 3

Linear interpolation in loop
I totally agree with Bob. (By the way, this is not linear interpolation. Interpolation passes exactly through ALL points.) You ...

8 giorni ago | 1

| accepted

Plotting a 2D crystal lattice from two primitive lattice vectors
First, you need to understand that MATLAB does not understand what you intend by this notation: v1= -0.5i + -sqrt(3)/2j Both i...

9 giorni ago | 0

Can someone help me
Why do you assume an analytical Laplace transform exists? There are many functions for which this is not true. Even then, there ...

9 giorni ago | 2

Help on trigonometric operations using syms variable.
You probably need to use rewrite. syms t4 S = sind(t4-90) S = sin((pi*(t4 - 90))/180) rewrite(expand(S),'sincos') ans ...

11 giorni ago | 2

| accepted

How to improve the accuracy of lu decomposition?
Sorry, but it is often the case that people are sloppy in their work. That is my expectation here. You gave us A and x_sol, but...

11 giorni ago | 0

how can I perform curve fitting for 3 degree exponential equation?
Fit will do it, sort of. You will need to pose an explicit model for the three terms. But please consider if you really can do ...

12 giorni ago | 0

| accepted

which way to call function is better?
Neither way is "better". Both feel just a little clumsy, since I'm not sure why you feel the need to package the variables toget...

13 giorni ago | 2

| accepted

secant method trouble shooting
When you have a problem like this, plot the function. In fact, plot the function anyway! Next, it is a bad idea to use variable...

13 giorni ago | 0

| accepted