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

I have to solve un overdetermined system with least squares method. I wrote in matlab 'A\b' and it gives me only one solution correct. Why? Or how can I solve the problem efficently?

help pinv help lsqminnorm Either will apply.

I have to solve un overdetermined system with least squares method. I wrote in matlab 'A\b' and it gives me only one solution correct. Why? Or how can I solve the problem efficently?

help pinv help lsqminnorm Either will apply.

6 hours ago | 0

Answered

How can I normalize 3D points to be between 0;1 without changing the distribution ?

Sorry, but as soon as you do any normailzation at all, you ARE changing the distribution. It may be that you are not changing t...

How can I normalize 3D points to be between 0;1 without changing the distribution ?

Sorry, but as soon as you do any normailzation at all, you ARE changing the distribution. It may be that you are not changing t...

8 hours ago | 0

| accepted

Answered

how to fit implicit function to data

I'll just throw it into the curve fitting toolbox, although any tool would have sufficed for a first try. You should recognize t...

how to fit implicit function to data

I'll just throw it into the curve fitting toolbox, although any tool would have sufficed for a first try. You should recognize t...

9 hours ago | 1

| accepted

Answered

How do I increase precision in my variables

You cannot increase the precision of a variable. Double is it. Unless you want to DECREASE precision, and then you can go to a s...

How do I increase precision in my variables

You cannot increase the precision of a variable. Double is it. Unless you want to DECREASE precision, and then you can go to a s...

20 hours ago | 0

Answered

Using Matlab to find numerically all roots and plotting them

There are infinitely many solutions. So wanting to find all of them might take some time. But solve can easily find some princip...

Using Matlab to find numerically all roots and plotting them

There are infinitely many solutions. So wanting to find all of them might take some time. But solve can easily find some princip...

22 hours ago | 1

Answered

central limit theorem random process

What would this do? rand(1,N) So then, what would this do, if I appended a round on top? I.e., round(rand(1,N)) What possibl...

central limit theorem random process

What would this do? rand(1,N) So then, what would this do, if I appended a round on top? I.e., round(rand(1,N)) What possibl...

1 day ago | 0

Answered

Finding the pseudo inverse of a matrix

Perhaps I need to explain it differently, since you don't want to accept that there are some matrices that completely lack an in...

Finding the pseudo inverse of a matrix

Perhaps I need to explain it differently, since you don't want to accept that there are some matrices that completely lack an in...

1 day ago | 2

Answered

Polynomial fit through a certain point

You want to fit a quadratic polynomial through your data, but you also want to force it through 3 other data points? SIGH. A qu...

Polynomial fit through a certain point

You want to fit a quadratic polynomial through your data, but you also want to force it through 3 other data points? SIGH. A qu...

1 day ago | 0

Answered

curve fitting error:nlinfit rank deficient

Whats wrong? Mainly really poor starting values. Not enough data is another good reason, and a model that is not easily fit on d...

curve fitting error:nlinfit rank deficient

Whats wrong? Mainly really poor starting values. Not enough data is another good reason, and a model that is not easily fit on d...

1 day ago | 0

Answered

I wrote a code to produce twin primes, however it is pretty strenuous for my computer and I need some high numbers to check a conjecture. Is there a better way to get twin primes. Note: these twin primes are represented by 6m's where 6m+-1 are prime.

Ok, it looks like you are still interested in this, so here is an approach targetted more at what I hear from your last comment....

I wrote a code to produce twin primes, however it is pretty strenuous for my computer and I need some high numbers to check a conjecture. Is there a better way to get twin primes. Note: these twin primes are represented by 6m's where 6m+-1 are prime.

Ok, it looks like you are still interested in this, so here is an approach targetted more at what I hear from your last comment....

2 days ago | 0

| accepted

Answered

How to fit linear plateau equation ?

That is a completely different equation you describe. But it still makes only a little sense. Apparently, you want that your re...

How to fit linear plateau equation ?

That is a completely different equation you describe. But it still makes only a little sense. Apparently, you want that your re...

2 days ago | 0

Answered

Can anyone please help with this?

Use the tool designed to solve that problem. help polyfit

Can anyone please help with this?

Use the tool designed to solve that problem. help polyfit

2 days ago | 0

Answered

Fit a parabola between two points (start and end), given the local inclinations in those points

Nope. Nobody can help you. Sad, but true. In fact, unless you get very lucky, nobody can ever solve this problem. Why not? You ...

Fit a parabola between two points (start and end), given the local inclinations in those points

Nope. Nobody can help you. Sad, but true. In fact, unless you get very lucky, nobody can ever solve this problem. Why not? You ...

2 days ago | 0

Answered

hello, i have eigen values and eigen vectors and now i need the matriz of that eigen vectors, how i do the opposite of the [V, D] = eig()?

If A is symmetric, then V*D*V' should suffice to recover A. For example: A = rand(5); A = A + A'; [V,D] = eig(A); norm(A - V*...

hello, i have eigen values and eigen vectors and now i need the matriz of that eigen vectors, how i do the opposite of the [V, D] = eig()?

If A is symmetric, then V*D*V' should suffice to recover A. For example: A = rand(5); A = A + A'; [V,D] = eig(A); norm(A - V*...

3 days ago | 1

| accepted

Answered

Make Matlab work for several hours can damage my laptop?

Massive, long computations with large matrices, etc., can indeed heat my computer up, forcing my fan to kick on. I use a station...

Make Matlab work for several hours can damage my laptop?

Massive, long computations with large matrices, etc., can indeed heat my computer up, forcing my fan to kick on. I use a station...

3 days ago | 0

Answered

how to control fitting in 'lsqcurvefit'?

You cannot do so with lsqnonlin or lsqcurvefit, because those tools do not allow general linear equality constraints. Sorry, but...

how to control fitting in 'lsqcurvefit'?

You cannot do so with lsqnonlin or lsqcurvefit, because those tools do not allow general linear equality constraints. Sorry, but...

3 days ago | 0

Answered

how to connect neighbor points in a scattered 2D plot?

help delaunay

how to connect neighbor points in a scattered 2D plot?

help delaunay

4 days ago | 0

| accepted

Answered

How to get nlinfit to take outliers into account?

Hmm. I could say you can't, at least not very well. Or I could say it already does take them into account, but that it just does...

How to get nlinfit to take outliers into account?

Hmm. I could say you can't, at least not very well. Or I could say it already does take them into account, but that it just does...

4 days ago | 0

| accepted

Answered

Vector equation with two unknowns

syms V W VW = solve([ -1 0 0 ]*V == [ 0 -1/3 0 ] + [ -4 4 0 ]*W) VW = struct with fields: V: [1×1 sym] W: [1×1...

Vector equation with two unknowns

syms V W VW = solve([ -1 0 0 ]*V == [ 0 -1/3 0 ] + [ -4 4 0 ]*W) VW = struct with fields: V: [1×1 sym] W: [1×1...

5 days ago | 2

Answered

How to calculate differences of two floating means in a vector of ~10^6 entries?

Start using MATLAB, in the way it was designed to be used. It seems here, you want to compute a floating mean, a term I've not h...

How to calculate differences of two floating means in a vector of ~10^6 entries?

Start using MATLAB, in the way it was designed to be used. It seems here, you want to compute a floating mean, a term I've not h...

5 days ago | 1

| accepted

Answered

Why does my log-normal distribution not fit my data?

Consider thisexample: X = lognrnd(0,1,[1,1000]); histogram(X,100,'normalization','probability') hold on ezplot(@(x) lognpdf(...

Why does my log-normal distribution not fit my data?

Consider thisexample: X = lognrnd(0,1,[1,1000]); histogram(X,100,'normalization','probability') hold on ezplot(@(x) lognpdf(...

6 days ago | 1

| accepted

Answered

Numerical solver finds different answer depending on guess

This question suffers from several misunderstandings about optimization tools, several common problems. First, think of an opti...

Numerical solver finds different answer depending on guess

This question suffers from several misunderstandings about optimization tools, several common problems. First, think of an opti...

6 days ago | 0

Answered

Need help in Optimization Problem

I'm not sure where you get the number 64 there. And indeed, the optimization toolbox will not help you, at least not directly. ...

Need help in Optimization Problem

I'm not sure where you get the number 64 there. And indeed, the optimization toolbox will not help you, at least not directly. ...

6 days ago | 0

Answered

What is the starting point in Curve Fitting Tool?

Resolve it? Probably not completely resolve it without seeing what you did exactly, and seeing some data that you have a problem...

What is the starting point in Curve Fitting Tool?

Resolve it? Probably not completely resolve it without seeing what you did exactly, and seeing some data that you have a problem...

7 days ago | 0

| accepted

Answered

Revised Simplex Method Solution

I would say to read the docs for linprog, where this will have been explained in some depth. But perhaps it may be confusing sti...

Revised Simplex Method Solution

I would say to read the docs for linprog, where this will have been explained in some depth. But perhaps it may be confusing sti...

7 days ago | 2

Answered

Symbolic indefinite integral of piecewise function gives wrong results

Personally, I'd suggest trying to define a piecewise function using abs is a dangerous thing, something that will only get you i...

Symbolic indefinite integral of piecewise function gives wrong results

Personally, I'd suggest trying to define a piecewise function using abs is a dangerous thing, something that will only get you i...

7 days ago | 0

Answered

how do I use the factorial function in a for loop

I see one other problem in the code you have written. I would guess that really, the formula you WANTED to write is: W(h) = N...

how do I use the factorial function in a for loop

I see one other problem in the code you have written. I would guess that really, the formula you WANTED to write is: W(h) = N...

8 days ago | 0

Answered

Critical points for system of 3 first order differential equations

What would you define a critical point to be? Perhaps one where u'1=u'2=u'3=0? How would you identify that set of points? Perha...

Critical points for system of 3 first order differential equations

What would you define a critical point to be? Perhaps one where u'1=u'2=u'3=0? How would you identify that set of points? Perha...

8 days ago | 1

| accepted

Answered

Why is this code returning values of zero?

Does zero for all variables trivially satisfy the equations? (Yes.) Did you request a solution of the equations? (Yes.) Do you...

Why is this code returning values of zero?

Does zero for all variables trivially satisfy the equations? (Yes.) Did you request a solution of the equations? (Yes.) Do you...

8 days ago | 0

Answered

How to use secant method to solve two equations

The secant method does not have a simple extension into multiple dimensions, although I am sure one could cobble something up. F...

How to use secant method to solve two equations

The secant method does not have a simple extension into multiple dimensions, although I am sure one could cobble something up. F...

8 days ago | 0