Community Profile

photo

John D'Errico


Retired

4 529 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
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer
  • Promoter
  • Speed Demon
  • CUP Challenge Master
  • Creator
  • Commenter
  • Solver

View details...

Contributions in
View by

Answered
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...

ungefär 3 timmar ago | 0

Answered
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...

ungefär 5 timmar ago | 0

Answered
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...

ungefär 8 timmar ago | 0

Answered
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...

ungefär 18 timmar ago | 0

| accepted

Answered
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 ...

en dag ago | 1

Answered
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...

2 dagar ago | 1

Answered
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...

2 dagar ago | 0

Answered
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...

2 dagar ago | 1

Answered
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...

2 dagar ago | 0

| accepted

Answered
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 ...

3 dagar ago | 0

Answered
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...

3 dagar ago | 2

Answered
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 ...

3 dagar ago | 2

| accepted

Answered
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 ...

4 dagar ago | 1

Answered
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...

4 dagar ago | 0

Answered
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 ...

5 dagar ago | 3

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

6 dagar ago | 1

| accepted

Answered
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...

7 dagar ago | 0

Answered
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 ...

7 dagar ago | 2

Answered
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 ...

9 dagar ago | 2

| accepted

Answered
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...

9 dagar ago | 0

Answered
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 ...

10 dagar ago | 0

| accepted

Answered
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...

11 dagar ago | 2

| accepted

Answered
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...

11 dagar ago | 0

| accepted

Answered
Rolling Beta For Multiple x and y variables simultaneously
Is the x vector equally spaced? If so, then my movingslope code (found on the File Exchange) will do it trivially and efficientl...

11 dagar ago | 1

Answered
How do I plot an equation with an imaginary quantity?
Look at what you have. t=[0:0.01:10]; y=exp(-5*i*t); y(1:5) ans = 1 + 0i 0.99875 - 0.049979i ...

12 dagar ago | 0

Answered
Generate random Bistochastic matrix with zero diagonals
Hmm. I notice that the re-normalization trick offered by dpb sometimes seems to not converge well. That begs the question of wh...

12 dagar ago | 0

Answered
matalb convolution with memory
This is not a job for convolution, since h lies on both sides of the equality, with a lag on h. Use filter instead. You should...

13 dagar ago | 0

Answered
Compare and modify random vector with evenly spaced vector
Again, learn to use the tools in MATLAB. The first was linspace. A second is discretize. A=[0.1, 0.21, 0.346, 0.59, 0.744, 1]; ...

14 dagar ago | 2

| accepted

Answered
re-looping after terminating
Trivial. Put the code INSIDE function. LEARN TO USE FUNCTIONS!!!!!! LEARN TO USE FUNCTIONS! LEARN TO USE FUNCTIONS! There, I sa...

15 dagar ago | 0

Answered
Solve not finding trivial zero
As always, you absolutely need to tell what release you are using, because this works with no problem. Done using R2019a: syms ...

17 dagar ago | 0

| accepted

Load more