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

How to find all solutions to a function?

This could be a deflating experience. ;-) x(1) = vpasolve(f) x = -1.8454863060096746759606364851789 >> x(2) = vpas...

How to find all solutions to a function?

This could be a deflating experience. ;-) x(1) = vpasolve(f) x = -1.8454863060096746759606364851789 >> x(2) = vpas...

2 hours ago | 0

Answered

How can I get a value not NaN when calculating ''inf/inf''?

There is no consistent numeric value you can obtain when taking the ration inf/inf. Should it be 1? Clearly x/x is always 1, ...

How can I get a value not NaN when calculating ''inf/inf''?

There is no consistent numeric value you can obtain when taking the ration inf/inf. Should it be 1? Clearly x/x is always 1, ...

4 hours ago | 0

| accepted

Answered

How to calculate a derivative of function numerically?

You can use symbolic tools to compute the derivative, if you have that toolbox. But if you wish todo so numerically, then you ne...

How to calculate a derivative of function numerically?

You can use symbolic tools to compute the derivative, if you have that toolbox. But if you wish todo so numerically, then you ne...

1 day ago | 0

Answered

How to permanently set the search path?

Once your search path has been established, using tools like pathdef, addpath, rmpath, userpath, path, pathtool, you can then us...

How to permanently set the search path?

Once your search path has been established, using tools like pathdef, addpath, rmpath, userpath, path, pathtool, you can then us...

1 day ago | 0

Answered

How do I display even numbers between A and 100 in one single column?

How do you turn a row into acolumn? Use reshape. Or, use transpose. Or, use V(:) In any case, all will create a co...

How do I display even numbers between A and 100 in one single column?

How do you turn a row into acolumn? Use reshape. Or, use transpose. Or, use V(:) In any case, all will create a co...

1 day ago | 1

Answered

I have ( An ) matrix, I need generalised algorithm to calculate An-1 = An *B. Here An-1, An, and B are matrices.

You have A3, and you want to compute A2 and A1? A2 = A3*B; A1 = A2*B; You want a general "algorithm"? DON'T DO IT....

I have ( An ) matrix, I need generalised algorithm to calculate An-1 = An *B. Here An-1, An, and B are matrices.

You have A3, and you want to compute A2 and A1? A2 = A3*B; A1 = A2*B; You want a general "algorithm"? DON'T DO IT....

2 days ago | 1

| accepted

Answered

Zscore and solving by definition differ

Source? Basic mathematics. An eigenvector is NOT unique. If A is a square matrix, with eigenvalue lambda, and eigenvector X, ...

Zscore and solving by definition differ

Source? Basic mathematics. An eigenvector is NOT unique. If A is a square matrix, with eigenvalue lambda, and eigenvector X, ...

2 days ago | 0

| accepted

Answered

Numerical Garbage value in Matrix

help real Better yet, compare the results of abs(real(A)) to abs(imag(A)). As long as the imaginary part is small, just del...

Numerical Garbage value in Matrix

help real Better yet, compare the results of abs(real(A)) to abs(imag(A)). As long as the imaginary part is small, just del...

3 days ago | 1

Answered

How to force a exponential fit to go through a preestablish point (x,y)?

'StartPoint' refers to the initial parameter guess for the model, since this is an optimization problem. Not a point the curve m...

How to force a exponential fit to go through a preestablish point (x,y)?

'StartPoint' refers to the initial parameter guess for the model, since this is an optimization problem. Not a point the curve m...

3 days ago | 0

Answered

How likely is it that I can use simple linear regression to predict?

No real world data truly follows a perfectly linear model. Even where there is an essentially linear domain, there are always li...

How likely is it that I can use simple linear regression to predict?

No real world data truly follows a perfectly linear model. Even where there is an essentially linear domain, there are always li...

6 days ago | 0

Answered

Order of logical operators

You need to recognize how MATLAB evaluates a logical expression. Many people use that shorthand, to indicate two coupled compari...

Order of logical operators

You need to recognize how MATLAB evaluates a logical expression. Many people use that shorthand, to indicate two coupled compari...

7 days ago | 1

| accepted

Answered

is it possible that answers can be accepted?

Being an MVP does not give you the privilege to doubly accept an answer. Read the help for Answers. It tells you what privileges...

is it possible that answers can be accepted?

Being an MVP does not give you the privilege to doubly accept an answer. Read the help for Answers. It tells you what privileges...

7 days ago | 1

| accepted

Answered

Plotting the area defin

You know how to use meshgrid! In fact, I know that, because you used it in your other question. So it you want to plot someth...

Plotting the area defin

You know how to use meshgrid! In fact, I know that, because you used it in your other question. So it you want to plot someth...

7 days ago | 1

Answered

Start point power law fit

I'm not positive what tools you are using for the fit. I will assume the curve fitting toolbox. Almost all optimizers (nonlin...

Start point power law fit

I'm not positive what tools you are using for the fit. I will assume the curve fitting toolbox. Almost all optimizers (nonlin...

8 days ago | 0

Answered

Looking for some tips on a Simulation Project!

Is there a better way? Not really. In fact, your plan is actually a good one, and arguably the best approach. The true art will ...

Looking for some tips on a Simulation Project!

Is there a better way? Not really. In fact, your plan is actually a good one, and arguably the best approach. The true art will ...

8 days ago | 1

| accepted

Answered

assemble global stiffness matrix

K = zeros(10,10); k = [1 -1; -1 1]; for n = 1:9; rind = n + [0 1]; cind = rind; K(rind, cind) = K(rind, c...

assemble global stiffness matrix

K = zeros(10,10); k = [1 -1; -1 1]; for n = 1:9; rind = n + [0 1]; cind = rind; K(rind, cind) = K(rind, c...

8 days ago | 0

| accepted

Answered

Create a polar function from a polar regression

Your question is slightly ambiguous. Are you looking to find a model of the form z=f(r,theta)? Or do you want some model that li...

Create a polar function from a polar regression

Your question is slightly ambiguous. Are you looking to find a model of the form z=f(r,theta)? Or do you want some model that li...

9 days ago | 0

Answered

What are Contour Levels

A contour of the function z(x,y) is a set of points in the (x,y) plane, such that z(x,y) is fixed at some constant value. That c...

What are Contour Levels

A contour of the function z(x,y) is a set of points in the (x,y) plane, such that z(x,y) is fixed at some constant value. That c...

9 days ago | 0

Answered

Operands to the || and && operators must be convertible to logical scalar values

LEARN TO USE THE DEBUGGER!!!!!!!!! I did this: dbstop if error Next, I ran your code. Well, I tried to run it. f...

Operands to the || and && operators must be convertible to logical scalar values

LEARN TO USE THE DEBUGGER!!!!!!!!! I did this: dbstop if error Next, I ran your code. Well, I tried to run it. f...

9 days ago | 3

| accepted

Answered

Exponential fit using Linear Regression

Write down the model you want to use. DO IT! You can't solve this unless you understand & think about what you are doing. That r...

Exponential fit using Linear Regression

Write down the model you want to use. DO IT! You can't solve this unless you understand & think about what you are doing. That r...

10 days ago | 0

| accepted

Answered

How to calculate the ratio of two primes in a given set of primes?

As long as the set is sorted, you never need to worry about the ratio being greater than than 1. How do you compute a base 3 ...

How to calculate the ratio of two primes in a given set of primes?

As long as the set is sorted, you never need to worry about the ratio being greater than than 1. How do you compute a base 3 ...

11 days ago | 1

Answered

gamma function for N>100

No. You will not make it work for large values, when they exceed the limits of gamma itself. Your code is not better than what y...

gamma function for N>100

No. You will not make it work for large values, when they exceed the limits of gamma itself. Your code is not better than what y...

12 days ago | 1

Answered

find rows of Zeros in matrix

Time to learn MATLAB. How do you find that something is zero? A == 0 That returns 1 where an element of A is zero. EXACT...

find rows of Zeros in matrix

Time to learn MATLAB. How do you find that something is zero? A == 0 That returns 1 where an element of A is zero. EXACT...

12 days ago | 1

Answered

If statement with many logical or.

Your problem is EXACTLY in that you are trying to compare floating point numbers, for exact equality. This is something you shou...

If statement with many logical or.

Your problem is EXACTLY in that you are trying to compare floating point numbers, for exact equality. This is something you shou...

12 days ago | 2

Answered

Function not defined but it is in fact defined

Did you actually save it as an m-file? Is it saved to your search path? NOT saved in one of the MATLAB supplied directories? ...

Function not defined but it is in fact defined

Did you actually save it as an m-file? Is it saved to your search path? NOT saved in one of the MATLAB supplied directories? ...

13 days ago | 0

Answered

The following error is found: "Warning: Failure at t=7.068767e-01. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.776357e-15) at time t. > In ode45 (line 308)" Any suggestions as to a fix?

This is the classic signal of a stiff system. If you needed more than that, the numbers with widely varying orders of magnitude ...

The following error is found: "Warning: Failure at t=7.068767e-01. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.776357e-15) at time t. > In ode45 (line 308)" Any suggestions as to a fix?

This is the classic signal of a stiff system. If you needed more than that, the numbers with widely varying orders of magnitude ...

13 days ago | 0

Answered

Volume of irregular shape

Not sure I see the problem. You apparently have cross sections in say x and y, presumably, at various values for z. That means y...

Volume of irregular shape

Not sure I see the problem. You apparently have cross sections in say x and y, presumably, at various values for z. That means y...

13 days ago | 0

| accepted

Answered

How to make an exponential function taking as input a vector?

inp = 3; syms n n.^(0:inp-1) ans = [ 1, n, n^2]

How to make an exponential function taking as input a vector?

inp = 3; syms n n.^(0:inp-1) ans = [ 1, n, n^2]

14 days ago | 0

| accepted

Answered

How can I do least square problem to get certain area?

Compute the area of the polygon. I'll call it A. polyarea should suffice. Recognize that area scales with the square of the u...

How can I do least square problem to get certain area?

Compute the area of the polygon. I'll call it A. polyarea should suffice. Recognize that area scales with the square of the u...

14 days ago | 0