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

Answered

if condition for infinity

You cannot test for the word 'finite', and expect it to return a valid result, when compared to an inf value. x = inf x = ...

if condition for infinity

You cannot test for the word 'finite', and expect it to return a valid result, when compared to an inf value. x = inf x = ...

8 hours ago | 0

Answered

Sum of a 4D matrix

The problem is a relatively easy one, as long as the total sum does not exceed 1. It gets nasty above that. I'll look at the pr...

Sum of a 4D matrix

The problem is a relatively easy one, as long as the total sum does not exceed 1. It gets nasty above that. I'll look at the pr...

2 days ago | 1

Answered

Linear Programming With geq constraints

You switch the sign of a constraint simply by multiplying everything by -1. I thought that was like elementary school math. Did ...

Linear Programming With geq constraints

You switch the sign of a constraint simply by multiplying everything by -1. I thought that was like elementary school math. Did ...

3 days ago | 0

| accepted

Answered

How to create a spline for data without sorting?

I can certainly do it with interparc. But it gets tricky, because interparc is set up to find points that are designated in term...

How to create a spline for data without sorting?

I can certainly do it with interparc. But it gets tricky, because interparc is set up to find points that are designated in term...

4 days ago | 1

| accepted

Answered

How can I reverse C = mpower(A,B)

Um, you can't. Information tossed into the bit bucket is irretrievably lost. In your example, A1 is upper triangular, with 0 on...

How can I reverse C = mpower(A,B)

Um, you can't. Information tossed into the bit bucket is irretrievably lost. In your example, A1 is upper triangular, with 0 on...

4 days ago | 0

| accepted

Answered

Extract rectangular grid from triangulation

The simple answer is to just round the points to a lattice. That is, just assign each point to the nearest lattice point. Since ...

Extract rectangular grid from triangulation

The simple answer is to just round the points to a lattice. That is, just assign each point to the nearest lattice point. Since ...

4 days ago | 0

Answered

non linear equation with single root

fzero does not find a root, cannot find it, because it has no zero crossing. That is a requirement for fzero. Effectively, there...

non linear equation with single root

fzero does not find a root, cannot find it, because it has no zero crossing. That is a requirement for fzero. Effectively, there...

4 days ago | 1

| accepted

Answered

Curve Fitting Equation result

Those are approximate confidence limits on the variable as estimated. (Not always very good limits, as I said, approximate.) I...

Curve Fitting Equation result

Those are approximate confidence limits on the variable as estimated. (Not always very good limits, as I said, approximate.) I...

5 days ago | 0

| accepted

Answered

coefficients of the polynomial - the least squares method

Sort of correct. But I see at least two subtle problems. First, you have 9 data points. So a polynomial with as many coefficien...

coefficients of the polynomial - the least squares method

Sort of correct. But I see at least two subtle problems. First, you have 9 data points. So a polynomial with as many coefficien...

6 days ago | 0

| accepted

Answered

excel linear regression trouble vs excel linear regression

Simple enough. polyfit(x,y,1) ans = -0.002965 1.7919 Or: regress(y',[x',ones(length(x),1)]) ans = -0.002965...

excel linear regression trouble vs excel linear regression

Simple enough. polyfit(x,y,1) ans = -0.002965 1.7919 Or: regress(y',[x',ones(length(x),1)]) ans = -0.002965...

7 days ago | 0

Answered

Solving linear equations with large matrices

Enough information now that I'll hazard an answer. By the way, the logic behind suggesting GMRES is NOT that your matrix is spa...

Solving linear equations with large matrices

Enough information now that I'll hazard an answer. By the way, the logic behind suggesting GMRES is NOT that your matrix is spa...

7 days ago | 1

| accepted

Answered

Why is the answer from the calculator and matlab different?

Because 455^100 is a computation done in DOUBLE PRECISION. Assuch, it goes well beyond the limits of what a double can represent...

Why is the answer from the calculator and matlab different?

Because 455^100 is a computation done in DOUBLE PRECISION. Assuch, it goes well beyond the limits of what a double can represent...

8 days ago | 1

Answered

How to solve an equation, with infinite solutions, to find only n number of solutions?

Provably getting the FIRST 5 solutions is essentially impossible on a completely general function, as it is trivial to write a f...

How to solve an equation, with infinite solutions, to find only n number of solutions?

Provably getting the FIRST 5 solutions is essentially impossible on a completely general function, as it is trivial to write a f...

9 days ago | 0

Answered

Solving system of n equations

syms a x b y EQ = y == a*x + b; isolate(EQ,x) ans = x == -(b - y)/a

Solving system of n equations

syms a x b y EQ = y == a*x + b; isolate(EQ,x) ans = x == -(b - y)/a

9 days ago | 0

Answered

How do I create a repeating number series?

LEARN TO USE MATLAB. 0.25:.5:25 ans = Columns 1 through 11 0.25 0.75 1.25 1.75 2...

How do I create a repeating number series?

LEARN TO USE MATLAB. 0.25:.5:25 ans = Columns 1 through 11 0.25 0.75 1.25 1.75 2...

9 days ago | 0

| accepted

Answered

interpolation of scatter data

First, your original contour plot. Next, the interpolated one. So much noisier. Interpolation does not necessarily make th...

interpolation of scatter data

First, your original contour plot. Next, the interpolated one. So much noisier. Interpolation does not necessarily make th...

9 days ago | 0

| accepted

Answered

How to Solve Non-Linear Equation with changing coefficient

Note there is no need to use fzero. Roots is entirely adequate, and more accurate. Roots also recognizes there are TWO real solu...

How to Solve Non-Linear Equation with changing coefficient

Note there is no need to use fzero. Roots is entirely adequate, and more accurate. Roots also recognizes there are TWO real solu...

10 days ago | 2

Answered

Interp1 command, wrong number of input arguments

Read the help for interp1. With 4 input arguments: Vq = interp1(X,V,Xq,METHOD) specifies the interpolation method. The a...

Interp1 command, wrong number of input arguments

Read the help for interp1. With 4 input arguments: Vq = interp1(X,V,Xq,METHOD) specifies the interpolation method. The a...

10 days ago | 0

Answered

how to make 2d lookup table when having 3 vectors

The problem is, your data is insufficient to create a 2-d surface from only that data. (Yes, you CAN use a scatteredInterpolant,...

how to make 2d lookup table when having 3 vectors

The problem is, your data is insufficient to create a 2-d surface from only that data. (Yes, you CAN use a scatteredInterpolant,...

10 days ago | 0

Answered

Numerical solution of a matlab function.

This is just a continuation of the last time the same question was asked, and answered. https://www.mathworks.com/matlabcentral...

Numerical solution of a matlab function.

This is just a continuation of the last time the same question was asked, and answered. https://www.mathworks.com/matlabcentral...

11 days ago | 1

Answered

How do I test a vector element by element for imaginary elements

What does the function imag return? Given that, what would imag( r ) ~= 0 tell you? see that it returns a true or false valu...

How do I test a vector element by element for imaginary elements

What does the function imag return? Given that, what would imag( r ) ~= 0 tell you? see that it returns a true or false valu...

11 days ago | 0

| accepted

Answered

Print all possible matrix combinations for a given matrix

You are going mad because ... Your problem is poorly formulated. i.e., how close to S/3 do you need to be? For long vectors, y...

Print all possible matrix combinations for a given matrix

You are going mad because ... Your problem is poorly formulated. i.e., how close to S/3 do you need to be? For long vectors, y...

11 days ago | 2

Answered

Finding pythagoras triples when only c is known

Alternatively... Talk to Euclid. An old guy, maybe even dead by now. He gave us a formula for Pythagorean triples. https://en....

Finding pythagoras triples when only c is known

Alternatively... Talk to Euclid. An old guy, maybe even dead by now. He gave us a formula for Pythagorean triples. https://en....

12 days ago | 5

| accepted

Answered

How can I make magic matrix if I know the diagonal

Not all problems have a solution. But sometimes, they do, IF you are willing to relax some conditions. A classical magic square ...

How can I make magic matrix if I know the diagonal

Not all problems have a solution. But sometimes, they do, IF you are willing to relax some conditions. A classical magic square ...

12 days ago | 4

| accepted

Answered

does the query points in gridfit function need to start from zero?

No. There is no requirement about needing to start from zero. In fact, those were WARNINGS, not errors. It MAY indicate a proble...

does the query points in gridfit function need to start from zero?

No. There is no requirement about needing to start from zero. In fact, those were WARNINGS, not errors. It MAY indicate a proble...

13 days ago | 0

| accepted

Answered

Data point missing in if statement

Let me explain separately, since you are misssing the point. The important point is NOT that there are duplicated points at (5...

Data point missing in if statement

Let me explain separately, since you are misssing the point. The important point is NOT that there are duplicated points at (5...

13 days ago | 0

| accepted

Answered

Locating a point along a curve some distance away from an initial point.

Easy, peasy. That is, assuming you are asking about a distance in terms of arclength along the curve. If not, then the answer is...

Locating a point along a curve some distance away from an initial point.

Easy, peasy. That is, assuming you are asking about a distance in terms of arclength along the curve. If not, then the answer is...

14 days ago | 1

| accepted

Answered

how to get the numerical solution of Non linear equation for unknown variable

Confusing. That usually means the person is also confused. We are shown an integral on the left hand side. It is an integral ov...

how to get the numerical solution of Non linear equation for unknown variable

Confusing. That usually means the person is also confused. We are shown an integral on the left hand side. It is an integral ov...

15 days ago | 0

Answered

what is tje problem whit the function "solve"?

Is zero a valid solution? It appears to be so. (By the way, you don't put the names of the variables in quotes to call solve. Bu...

what is tje problem whit the function "solve"?

Is zero a valid solution? It appears to be so. (By the way, you don't put the names of the variables in quotes to call solve. Bu...

16 days ago | 1

| accepted

Answered

right triangle area within a certain tolerence

You have two problems in one line. Worse, you have two problems virtually within the same character. Hey, that could be a record...

right triangle area within a certain tolerence

You have two problems in one line. Worse, you have two problems virtually within the same character. Hey, that could be a record...

16 days ago | 0