Community Profile

# John D'Errico

### Retired

4.129 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

Answered
picking those matrices whose determinant is greater than 0
WTP? if b > 0 disp(a) end

etwa eine Stunde ago | 0

Answered
How to add custom equation for fitting
You are over thinking things, thinking you need to use sum, etc. What is a polynomial model? What do you have? What are the unk...

etwa 5 Stunden ago | 0

Answered
use more digits in computing in matlab
Sorry. Unfortunately, you cannot simply request more precision in your computations in MATLAB. The trick is to learn to do your...

etwa 6 Stunden ago | 1

Answered
I have a large vector, I would like to find a set of data which is a subset of the large vector.
ismember is exactly the tool to solve your problem. A = [1 3 5 7 9 8 6 4 2]; B = [5 6]; [LIA,LOCB] = ismember(A,B) LIA = ...

ein Tag ago | 1

Answered
Switch to write programs
You could write a switch statement for this. The problem is, since each case does a different thing, you effectively need 100 di...

ein Tag ago | 1

Answered
Double vs Single Precision, Matlab in 2019
This topic is worth discussing. X = zeros(10,10, 'single'); The construction: X = single(zeros(10,10)); is four times slower!!...

2 Tage ago | 0

| accepted

Answered
how to decrease precision
You cannot tell MATLAB to use an arbitrary lower or higher precision. At most, you can work in single precision instead of doubl...

3 Tage ago | 0

| accepted

Answered
pick numbers from matrix with probability
This is one of those question that are almost impossible to answer, because your goal is so fuzzy, too unclear to write code to ...

3 Tage ago | 0

Answered
How do i plot 3 langrange polinomials in one figure?
Do you know how to plot ONE such polynomial? I hope so. If you do, then you need to use the hold command. That is, after you plo...

3 Tage ago | 0

Answered
Create binary vectors with specific hamming distance
Why does this seem pretty easy, if you just think about what Hamming distance means? https://en.wikipedia.org/wiki/Hamming_dist...

3 Tage ago | 0

| accepted

Answered
How to Show 1/4 in 1/2^2?
Do you mean this? format rat 1./(1:10).^2 ans = 1 1/4 1/9 1/16 1/25 ...

5 Tage ago | 2

Answered
in the old old days, whos function also give total variable size, how do i do that now [ver 9.4.0.813654 (R2018a)]
Easy peasy. Even trivial. whos Name Size Bytes Class Attributes ans 1x1 8...

5 Tage ago | 0

Answered
It shows: Undefined function 'vpasolve' for input arguments of type 'double' when I run it. Can I know how to solve this?
Is f a symbolic variable? (No.) We see this: syms f f=zeros(rr); fn=1+2.*sqrt(f).*log(((rr)./3.7)+(2.51./(Re.*sqrt(f)))); f...

5 Tage ago | 0

Answered
Exponential Fitting function not plotting the same information as the data points?
Where should I start? :-) A terribly important feature of ANY exponential model is you absolutely, positively need good start p...

5 Tage ago | 0

| accepted

Answered
Averaging every element with nearby elements
A simple solution is to use conv2. It works quite well inside the domain. But then you will need to be careful around the edges....

7 Tage ago | 1

| accepted

Answered
How to find the nearest pixel to the point attained by ginput() on the curve
Simple is to just extract the curve in terms of pixel coordinates. So you will have a list of points along the curve. Then use ...

7 Tage ago | 0

Answered
surface interpolation based on x/y/diagonals data
By far the simplest solution is to use inpaint_nans. It will produce a surface, interpolating those empty areas. (However, you s...

8 Tage ago | 4

| accepted

Answered
Trying to find the mean and standard deviation without using the built in functions?
You show a function that does it already, although at a quick glance, it appears to compute the standard deviation incorrectly. ...

8 Tage ago | 0

| accepted

Answered
Pearson correlation coefficient determination
What do you expect? It seems you keep on doing these computations, but then fail to think about the result, not thinking why you...

8 Tage ago | 0

| accepted

Answered
Plotting implicit equation with fimplicit
Easy enough. Try this, for example. vpasolve(f(1,y)) ans = -80.224189505722446658042301607259 vpasolve(f(-20,y)) ans = 6...

9 Tage ago | 0

Answered
stream flow computed by using the Standardized Streamflow Index (SSFI).
Before you try to do something sophisticated using some tool, you need to learn to use that tool. Don't try to run before you kn...

9 Tage ago | 0

Answered
Gram schmidth of polynomial
Of course orth is not designed to solve that problem, since it uses linear algebra. Nothing stops you from writing an orthognal...

9 Tage ago | 0

| accepted

Answered
problem with curve tracking obtained by the genetic algorithm
It is not really a mistake, except perhaps a mistake of choice. Or you might say a mistake of understanding the tools involved. ...

9 Tage ago | 2

| accepted

Answered
Solve for two variables within to linear modulus equations
Pretty easy, really. You have a linear system of modular equations. mod(32*a+b,256)==165 mod(101*a+b,256)==76 Just subtra...

9 Tage ago | 2

| accepted

Answered
Wrong results with "mod"
This fails because MATLAB cannot represent an integer larger than 2^53-1 as an exact integer, when working in double precision. ...

9 Tage ago | 3

Answered
Double Integral unkown limits
Basic calc? I hope this is not homework. But at least you made some effort. You have formulated the problem as q = int( int( ...

9 Tage ago | 1

| accepted

Answered
exact multiplication of variable in equation
But that IS the exact answer, the correct answer. Did you want MATLAB to produce the wrong answer? Maybe what you wanted is for...

9 Tage ago | 1

| accepted

Answered
Finding the point of intersection of a single-loop line of best fit from my data?
I guess I don't see what is the problem. If the curve self-intersects, AND you have a list of points that define the curve, then...

10 Tage ago | 1

Answered
Avoid infinity in the answer
Sorry. I had a typo in what I entered before. The first time through the loop. what do you expect? A is a scalar on the first ...

10 Tage ago | 1

| accepted

Load more