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

Unable to predict data well enough

I would point out that your code shows you using the first SEVEN data points, not the first 10, despite your claim otherwise. n...

Unable to predict data well enough

I would point out that your code shows you using the first SEVEN data points, not the first 10, despite your claim otherwise. n...

3 hours ago | 0

Answered

how can i find the intersection point between the vertical lines and the curve (xmin,ymin) ?

The red curve is a piecewise linear interpolation, not really a curve, just connect the dots by the plotting routine. The green...

how can i find the intersection point between the vertical lines and the curve (xmin,ymin) ?

The red curve is a piecewise linear interpolation, not really a curve, just connect the dots by the plotting routine. The green...

5 hours ago | 1

| accepted

Answered

lsqcurvefit: is the output of this function unique for a given set of initial conditions (and deterministic model)?

The problem is, that is not your code. Not all of it. That is just how you call lsqcurvefit. We do not see the pandemic1Dall2 co...

lsqcurvefit: is the output of this function unique for a given set of initial conditions (and deterministic model)?

The problem is, that is not your code. Not all of it. That is just how you call lsqcurvefit. We do not see the pandemic1Dall2 co...

9 hours ago | 1

Answered

change a logical array value based on the index of another matrix

If you want to create x on the fly, then just do this: x = A > 4; If you for some reason really want to modify an existing vec...

change a logical array value based on the index of another matrix

If you want to create x on the fly, then just do this: x = A > 4; If you for some reason really want to modify an existing vec...

1 day ago | 0

| accepted

Answered

What's the meaning of instrucment sound in Matlab?

Let me just answer this as if you asked for an explanation of what a sound is in the world of MATLAB. For example, if we try: l...

What's the meaning of instrucment sound in Matlab?

Let me just answer this as if you asked for an explanation of what a sound is in the world of MATLAB. For example, if we try: l...

1 day ago | 0

Answered

vector to upper and lower triangular matrix

What you fail to see is that while your code works for a 3x3 matrrix, it must always fail for any n other than n==3. You want t...

vector to upper and lower triangular matrix

What you fail to see is that while your code works for a 3x3 matrrix, it must always fail for any n other than n==3. You want t...

2 days ago | 0

| accepted

Answered

double differentiation and double integration of sine wave

This is not a question about MATLAB, just understanding some basic mathematics. At least, understanding calc 101. First, you ne...

double differentiation and double integration of sine wave

This is not a question about MATLAB, just understanding some basic mathematics. At least, understanding calc 101. First, you ne...

2 days ago | 0

Answered

Diagonal/Symmetric matrix

I don't even think your code works for a 3x3 matrix. The matrix it produces is OD OD = 81 23 18....

Diagonal/Symmetric matrix

I don't even think your code works for a 3x3 matrix. The matrix it produces is OD OD = 81 23 18....

2 days ago | 0

| accepted

Answered

How do I open a pcode (.p) file created in a version older than MATLAB R2007b? My Matlab version is R2018b.

You cannot edit a .p file, if that is what you mean by open. That is true in any version. If the .p file is too old, but you s...

How do I open a pcode (.p) file created in a version older than MATLAB R2007b? My Matlab version is R2018b.

You cannot edit a .p file, if that is what you mean by open. That is true in any version. If the .p file is too old, but you s...

4 days ago | 0

Answered

How to transfer a Matlab toolbox I have in my machine to the machine of a colleague ?

If this is a toolbox that you have purchased from Mathworks, you cannot give it to someone else. If this is a toolbox you have ...

How to transfer a Matlab toolbox I have in my machine to the machine of a colleague ?

If this is a toolbox that you have purchased from Mathworks, you cannot give it to someone else. If this is a toolbox you have ...

4 days ago | 0

Answered

For loop for matrix division

Why would you want to use any loop at all? For example, if A is an mxn matrix, and V is a vector of size mx1, then consider what...

For loop for matrix division

Why would you want to use any loop at all? For example, if A is an mxn matrix, and V is a vector of size mx1, then consider what...

4 days ago | 0

Answered

Can someone explain the concept of B= null(A) in simple words?

Think of A as a vector pointing someplace in a 5 dimensional space. Got that? It points somewhere. Now, in 5 dimensions, we co...

Can someone explain the concept of B= null(A) in simple words?

Think of A as a vector pointing someplace in a 5 dimensional space. Got that? It points somewhere. Now, in 5 dimensions, we co...

5 days ago | 1

| accepted

Answered

How to get more decimal places in my output?

In fact, it does NOT neglect that term. It is in there, just too small for you to see in only 4 decimal places. help format Yo...

How to get more decimal places in my output?

In fact, it does NOT neglect that term. It is in there, just too small for you to see in only 4 decimal places. help format Yo...

5 days ago | 1

Answered

How to remove last characters from String using mod?

It is generally a bad idea to use names for variables that are already useful function names. So here rem is one such bad idea. ...

How to remove last characters from String using mod?

It is generally a bad idea to use names for variables that are already useful function names. So here rem is one such bad idea. ...

7 days ago | 2

| accepted

Answered

Random sampling of elements from an array based on a target condition in MATLAB

Are you looking for an exact match to V1? An approximate sum equal to V1? If so, then how close of a tolerance do you need? Is ...

Random sampling of elements from an array based on a target condition in MATLAB

Are you looking for an exact match to V1? An approximate sum equal to V1? If so, then how close of a tolerance do you need? Is ...

7 days ago | 1

Answered

how to use large numbers

Depending on what you are doing, you can use any of several tools. For example ... The symbolic toolbox: sym(17)^173 ans = 7...

how to use large numbers

Depending on what you are doing, you can use any of several tools. For example ... The symbolic toolbox: sym(17)^173 ans = 7...

7 days ago | 1

| accepted

Answered

is max built in functions

Yes. max is definitely a built-in function. As such, use of it will have been (sadly) outlawed by your assignment.

is max built in functions

Yes. max is definitely a built-in function. As such, use of it will have been (sadly) outlawed by your assignment.

8 days ago | 0

| accepted

Answered

Calling a multivariable system of equations

I think you do not understand functions. And, well, I suppose this is a not uncommon problem for new users. There are at least t...

Calling a multivariable system of equations

I think you do not understand functions. And, well, I suppose this is a not uncommon problem for new users. There are at least t...

9 days ago | 0

Answered

I need to have eigenvalues of this matrix including symbols "m" and "n"

Actually, it is pretty easy, and the solution arrives almost immediately. A=[0 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt...

I need to have eigenvalues of this matrix including symbols "m" and "n"

Actually, it is pretty easy, and the solution arrives almost immediately. A=[0 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt...

9 days ago | 0

Answered

How to find integral of this function.

No, that is not going to have any closed form solution. One suggestion in the comments was to try vpaintegral. If it does not ...

How to find integral of this function.

No, that is not going to have any closed form solution. One suggestion in the comments was to try vpaintegral. If it does not ...

9 days ago | 0

| accepted

Answered

how to numerically define 1/x^2+0.4/(60-x)^2

If x is a vector or array, then you are trying to compute element-wise operations. But / and ^ and * are all operators that are ...

how to numerically define 1/x^2+0.4/(60-x)^2

If x is a vector or array, then you are trying to compute element-wise operations. But / and ^ and * are all operators that are ...

9 days ago | 0

Answered

Extrapolating rate constants from reaction data

l,k, m are just scalar symbolic variables. When you write solve(k) for example, it solves the problem k == 0 What is the ...

Extrapolating rate constants from reaction data

l,k, m are just scalar symbolic variables. When you write solve(k) for example, it solves the problem k == 0 What is the ...

10 days ago | 0

Answered

how to use Discretize syntax

Funny. Actually, both of the other answers have missed an important point. While they properly describe how to use discretize, b...

how to use Discretize syntax

Funny. Actually, both of the other answers have missed an important point. While they properly describe how to use discretize, b...

10 days ago | 1

Answered

Using Polyfiti, Polyval, and plotting

Ok, now that I know where you are coming from, I'll pose this as an answer. It looks correct to me. The call to polyfit will cr...

Using Polyfiti, Polyval, and plotting

Ok, now that I know where you are coming from, I'll pose this as an answer. It looks correct to me. The call to polyfit will cr...

11 days ago | 1

| accepted

Answered

all combinations of numbers

It is often true that people decide to do something unimaginably huge, because something small seemed easy enough. Computers are...

all combinations of numbers

It is often true that people decide to do something unimaginably huge, because something small seemed easy enough. Computers are...

12 days ago | 0

Answered

Double for Loop to find root of polynomial

lambda=2; Quadratic_For_Omega_Squared=@(L,M)[1,-(L^2 +2 * M^2 +1 -lambda), +M^2 * (L^2 +M^2 -lambda)]; L=1:-0.1:0; M=1:-0.1:0...

Double for Loop to find root of polynomial

lambda=2; Quadratic_For_Omega_Squared=@(L,M)[1,-(L^2 +2 * M^2 +1 -lambda), +M^2 * (L^2 +M^2 -lambda)]; L=1:-0.1:0; M=1:-0.1:0...

12 days ago | 0

| accepted

Answered

I need to plot hyperbolas with ellipses

Well, first, you need to write down the equation for the hyperbola. Seems silly, or maybe obvious, but you can't do anything wit...

I need to plot hyperbolas with ellipses

Well, first, you need to write down the equation for the hyperbola. Seems silly, or maybe obvious, but you can't do anything wit...

12 days ago | 0

Answered

taylor series expansion for acos(1-x)

Actually, the expansion you ask for does NOT exist. Why not? Because. I hope that is a good enough answer.. ;-) Seriously, the ...

taylor series expansion for acos(1-x)

Actually, the expansion you ask for does NOT exist. Why not? Because. I hope that is a good enough answer.. ;-) Seriously, the ...

12 days ago | 1

| accepted

Answered

Looking for a code in Matlab optimization

No. There is no direct code to do so, at least not that I know of. Should I write it? sigh. But if you spend some time reading,...

Looking for a code in Matlab optimization

No. There is no direct code to do so, at least not that I know of. Should I write it? sigh. But if you spend some time reading,...

12 days ago | 2

Answered

How to find the two Y values for my function with one known X value? please help

There must be a million ways. Here is a trivial one. f=@(x,y)2x*y - 6*y - 6*x + 4*x^2 + 6*y^2 - 12; syms Y Ysol = solve(f(2...

How to find the two Y values for my function with one known X value? please help

There must be a million ways. Here is a trivial one. f=@(x,y)2x*y - 6*y - 6*x + 4*x^2 + 6*y^2 - 12; syms Y Ysol = solve(f(2...

13 days ago | 0