Community Profile

photo

John D'Errico


Retired

4,120 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

  • Revival Level 3
  • 36 Month Streak
  • Thankful Level 4
  • Ace
  • Knowledgeable Level 4
  • First Answer
  • Promoter
  • Speed Demon
  • CUP Challenge Master
  • Creator
  • Commenter
  • Solver

View details...

Contributions in
View by

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

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

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

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

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

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

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

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

5 days ago | 0

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

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

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

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

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

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

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

6 days 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( ...

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

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

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

7 days ago | 1

| accepted

Answered
estimate the parameters of lognormal distribution by the some values of CDF
Looks like this does reasonably well to me. fplot(@(x) logncdf(x,-.4,.75),[0,2]) hold on plot(x,y,'.')

7 days ago | 0

Answered
3D data cumsum does not work
Oh. So it does not work if you do this? qq = cumsum(rr,3); I guess you should report that as a bug, because it works for me. I...

7 days ago | 1

| accepted

Answered
How to increase the precision of MATLAB R2015b
Short answer: You can't. Longer answer: Y o u c a n ' t d o t h a t. Well, not easily. ;-) Seriously, there is no floating ...

7 days ago | 0

| accepted

Answered
To find Maximum value and minimum value for each group of four rows for a 1576*1024 matrix
Please do not use flags just to ask a question. However, you have now asked repeatedly how to solve this problem to get the min...

8 days ago | 2

Answered
Minimising a matrix function subject to an equality constraint
It appears that y is merely a SYMBOLIC matrix, not a symmetric matrix, as others have assumed. But that just means that y is unk...

9 days ago | 0

Answered
Why are the solutions all zeros when using Gauss Seidel method for a sparse matrix
By the way, I have no idea why you felt it necessary to use struct2cell and cel2mat just to use load. Seems like using a Mack tr...

10 days ago | 0

Answered
How can I find which row has a specied values that I entered?
help ismember Read about the 'rows' option.

10 days ago | 2

Answered
Check each element in matrix is less than value
Learn to use MATLAB, as it is designed to be used. For example, you might just do this: Beta = -90*sign(T).*sign(Q); You don't...

10 days ago | 2

Answered
cubic spline spline at x=1
ppval(pp,1) Or, perhaps fnval(pp,1)

11 days ago | 1

Load more