Community Profile

photo

John D'Errico


Retired

4.541 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
How to make a nxm Vandermonde matrix?
A = x(:).^(2:-1:0); That works as long as you are using MATLAB R2016b or later. Earlier releases would need to use bsxfun, or e...

alrededor de 6 horas ago | 1

Answered
If we have non-linear constraint can we use "quadprog"
No. Quadprog is only able to accept LINEAR constraints. (equality, inequality, as well as bound constraints on the parameters. B...

alrededor de 7 horas ago | 0

Answered
Parallel Processing for Simple Code
Um, so? You clearly are not an experienced user of MATLAB. So your code may be inefficient. That it took a long time is not a su...

alrededor de 13 horas ago | 0

Answered
Linprog error "-96@30"?
You are trying to solve the problem of minimizing 3*x + 3.4*y subject to the constraint 3*x + 4*y <= 20000 with bound...

alrededor de 24 horas ago | 0

| accepted

Answered
Find minimum of an n variable function, n is like 800+
In theory, of course it is possible. Maybe not even that difficult. In practice, there are always issues that involve the skill ...

1 día ago | 1

Answered
I am trying to solve for an integral using the relation y(n)=ny(n-1)-(1/e) and that y(1)=1-(2/e). Below is my function but I am not sure what to do about the 'y(n-1)' part.
First, you might recognize that 1/e = 1/exp(1) = exp(-1). So if you are going to compute an exponential, thus exp(1), then why ...

1 día ago | 0

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

2 días ago | 1

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

2 días ago | 0

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

2 días ago | 0

| accepted

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

3 días ago | 1

| accepted

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

3 días ago | 1

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

4 días ago | 0

| accepted

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

4 días 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...

4 días 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...

4 días 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...

5 días 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 ...

5 días 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...

6 días 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...

6 días 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...

6 días 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...

6 días 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 ...

6 días ago | 0

| accepted

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

6 días 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 ...

7 días 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 ...

7 días 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...

8 días 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 ...

9 días 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 ...

9 días 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...

11 días ago | 0

| accepted

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

11 días ago | 2

Load more