Community Profile

photo

John D'Errico


Retired

4,353 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
Error using command integral
Simplest is to just use cumtrapz. All you want is a plot anyway. u = linspace(0,4,1000); fun = @(x)exp(-x.^2); plot(u,cumtrap...

20 hours ago | 1

| accepted

Answered
estimating the parameter of an equation
Um, don't use fminsearch? In fact, I'm not sure why you would want to do it that way. d = 17; n = 10000; kk=randn(n,1); u=...

1 day ago | 0

| accepted

Answered
Regarding Increase Resolution?
I'll take a stab at it. There are many tmes when we see in the movies, on TV, the idea that you can get almost anything out of ...

1 day ago | 2

Answered
How to perform mathematical operation between all elements of arrays with unequal numbers
A = rand(2,3); B = rand(4,5); C = A + reshape(B,[1,1,size(B)]); % Addition C = A - reshape(B,[1,1,size(B)]); % subtraction ...

2 days ago | 1

| accepted

Answered
Difference Between Curve Fitting and Surface Fitting
A curve, thus y=f(x), is a function of ONE independent variable. A surface, thus z=f(x,y), is a function of TWO independent var...

2 days ago | 0

Answered
What computer should I buy?
READ THE SYSTEM REQUIREMENTS. https://www.mathworks.com/support/requirements/matlab-system-requirements.html They suggest that...

3 days ago | 0

Answered
Promoting MATLAB at the higher edu institution I work for
This is not a question you could ask on Answers. Note that we are volunteers, not paid representatives of The MathWorks. As we...

3 days ago | 0

Answered
Error: index must be a positive integer or logical.
You wrote this: Bs(0)=-(imag(yo)); MATLAB is not whatever other language you came from. MATLAB has an index origin of 1, NOT 0...

3 days ago | 2

Answered
VAN DER PAUW equation
First, see that no symbolic solution will exist. If we have the general problem: exp(-A*x) + exp(-B*x) == 1 then by the tra...

4 days ago | 1

Answered
How to increment a variable
To increment a variable X, simply use X = X+1; MATLAB does not support the increment operator ++.

4 days ago | 6

| accepted

Answered
Function roots. Fixed-point iteration
First, what are the roots? Are you trying to solve the problem q(x) == 0? Or are you trying to solve the problem q(x)==x? A fix...

5 days ago | 0

Answered
solving nonlinear equation by fsolve
Using max inside an objective that will then be applied to fsolve is a bad idea. It creates a function that is at best non-diffe...

7 days ago | 0

Answered
Conditional statement with vectors
help discretize

7 days ago | 0

Answered
Why my result is 0×1 empty double column vector
Um, LOOK AT WHAT YOU DID? eqn eqn = [ 0 == 5780664229092589/18446744073709551616, 0 == 5780664229092589/18446744073709551616,...

8 days ago | 1

Answered
Getting a smooth curve instead of two linear functions
You have two lines that create what is NOT a function, in the sense that it is single valued. So, for any x, you get a y out. He...

8 days ago | 0

Answered
Y=sqrt((A^2*X^2+B^2*X^2)/(C+D^2*X^2))
People still seem to be missing that the fit will NOT be unique. The model cannot be estimated uniquely as it has been posed. Fi...

9 days ago | 2

Answered
How to solve extra long equations with multiple unknowns?
You have two fairly complicated equations, in two unknowns. Why do you expect an analytical solution to exist at all? I'd have b...

10 days ago | 0

| accepted

Answered
How to explain a bad performance rating using the bench command?
Lots of reasons are possible. The ones that come to mind immediately are: Were you running something else at the same time? Bro...

10 days ago | 0

Answered
How do I randomly generate numbers with a certain amount of probability?
As is often the case, I would suggest you are overthinking this. You have a sequence of 24 pairs of images to be shown. There ...

13 days ago | 0

Answered
Randomly dividing an integer (non-uniform distribution)
The problem with the alternative answers given, is they tend to have a flaw, in that they do not sample the space of interest we...

13 days ago | 2

Answered
How to plot a variable in MATLAB which can not be separated explicitly ?
Is ln meant to denote the NATURAL logarithm? If so, then you use log in MATLAB. At first, I thought you mean to write lin, whic...

15 days ago | 0

| accepted

Answered
could anyone help me how to reshape the matrix.
You are not asking to do a reshape, which does not change the total number of elements. A = A(1,:);

15 days ago | 0

| accepted

Answered
generating a sequence of numbers
Not if a1, a2, a3, a4, etc., are separate variables. If that is what you have done, then it is time to learn to program in ways ...

15 days ago | 0

| accepted

Answered
extrapolate the plot to the point out of the interval
You can't. Well, you can, but interp1 will give you meaningless garbage, as it should. Extrapolation is a dangerous thing. And ...

16 days ago | 1

Answered
why it can't be used as a number?
It can be used as a number, IF you understand what you are doing. MATLAB works in DOUBLE PRECISION. A double precision number w...

16 days ago | 3

| accepted

Answered
An example of using crammers rule or geuss elimination?
Don't use either of them! There are many examples of things that you might learn to use when doing homework, and in class as a s...

16 days ago | 0

Answered
Cannot use fzero function
My guess is you did not actually save that function as an m-file on your search path. This is why MATLAB could not find the func...

17 days ago | 1

Answered
How to define nuclear norm in matlab?
What is difficult to program? A quick search online suggests it is the L-1 norm of either the vector of singular values, or of t...

17 days ago | 0

| accepted

Answered
Why won't this program run?
Because you don't understand how to use the function zeros? Go back to go, do not collect $200, and read the getting started tut...

17 days ago | 1

Answered
It doesn't give a result. mablab couldn't take the integral of M = cos(2*pi*a*ti);
"It doesn't give a result. mablab couldn't take the integral of M = cos(2*pi*a*ti);" Actually, the failure arises because you d...

17 days ago | 2

Load more