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

the runtime (computational complexity) of perms function?

You are mistaking the problem here. The issue will always be allocating sufficient memory, thus, the memory required will be wha...

the runtime (computational complexity) of perms function?

You are mistaking the problem here. The issue will always be allocating sufficient memory, thus, the memory required will be wha...

environ 8 heures ago | 2

Answered

How to make a nxm Vandermonde matrix?

A = x(:).^(2:-1:0); That works as long as you are using MATLAB R2016b or later. Earlier releases would need to use bsxfun, or e...

How to make a nxm Vandermonde matrix?

A = x(:).^(2:-1:0); That works as long as you are using MATLAB R2016b or later. Earlier releases would need to use bsxfun, or e...

3 jours ago | 1

| accepted

Answered

If we have non-linear constraint can we use "quadprog"

No. Quadprog is only able to accept LINEAR constraints. (equality, inequality, as well as bound constraints on the parameters. B...

If we have non-linear constraint can we use "quadprog"

No. Quadprog is only able to accept LINEAR constraints. (equality, inequality, as well as bound constraints on the parameters. B...

3 jours ago | 0

| accepted

Answered

Parallel Processing for Simple Code

Um, so? You clearly are not an experienced user of MATLAB. So your code may be inefficient. That it took a long time is not a su...

Parallel Processing for Simple Code

Um, so? You clearly are not an experienced user of MATLAB. So your code may be inefficient. That it took a long time is not a su...

3 jours ago | 0

Answered

Linprog error "-96@30"?

You are trying to solve the problem of minimizing 3*x + 3.4*y subject to the constraint 3*x + 4*y <= 20000 with bound...

Linprog error "-96@30"?

You are trying to solve the problem of minimizing 3*x + 3.4*y subject to the constraint 3*x + 4*y <= 20000 with bound...

4 jours ago | 0

| accepted

Answered

Find minimum of an n variable function, n is like 800+

In theory, of course it is possible. Maybe not even that difficult. In practice, there are always issues that involve the skill ...

Find minimum of an n variable function, n is like 800+

In theory, of course it is possible. Maybe not even that difficult. In practice, there are always issues that involve the skill ...

4 jours ago | 1

Answered

I am trying to solve for an integral using the relation y(n)=ny(n-1)-(1/e) and that y(1)=1-(2/e). Below is my function but I am not sure what to do about the 'y(n-1)' part.

First, you might recognize that 1/e = 1/exp(1) = exp(-1). So if you are going to compute an exponential, thus exp(1), then why ...

I am trying to solve for an integral using the relation y(n)=ny(n-1)-(1/e) and that y(1)=1-(2/e). Below is my function but I am not sure what to do about the 'y(n-1)' part.

First, you might recognize that 1/e = 1/exp(1) = exp(-1). So if you are going to compute an exponential, thus exp(1), then why ...

4 jours ago | 0

Answered

How a solution depends on a variable

Using gamma as the name of a variable is a bad idea. Regardless,... Where is the problem? Just substitute a range of values for...

How a solution depends on a variable

Using gamma as the name of a variable is a bad idea. Regardless,... Where is the problem? Just substitute a range of values for...

5 jours ago | 1

Answered

Higher dimensional space of data

You want to project data into a HIGHER dimensinal space? Trivial. For example... data = rand(10,1); So data represents a set o...

Higher dimensional space of data

You want to project data into a HIGHER dimensinal space? Trivial. For example... data = rand(10,1); So data represents a set o...

5 jours ago | 0

Answered

symbolic equation Empty sym: 0-by-1

When solve returns an empty result, that means it can find no analytical solution. And since you have symbolic parameters in th...

symbolic equation Empty sym: 0-by-1

When solve returns an empty result, that means it can find no analytical solution. And since you have symbolic parameters in th...

5 jours ago | 0

| accepted

Answered

How can I plot a sin (x^2) function

First, there is ABSOLUTELY NO reason to predefine x as a sym. So this line is completely irrelevant: syms x; When you do creat...

How can I plot a sin (x^2) function

First, there is ABSOLUTELY NO reason to predefine x as a sym. So this line is completely irrelevant: syms x; When you do creat...

6 jours ago | 1

| accepted

Answered

Fixing code to do bisection properly

Um, look closely at the code that you wrote. Hey, it is your code. You should know what is in it. First, what does your functio...

Fixing code to do bisection properly

Um, look closely at the code that you wrote. Hey, it is your code. You should know what is in it. First, what does your functio...

6 jours ago | 1

Answered

difference between convolution code and 'conv' function

No difference at all, IF you are asking about the difference between a hand written code to do a numerical convolution computati...

difference between convolution code and 'conv' function

No difference at all, IF you are asking about the difference between a hand written code to do a numerical convolution computati...

6 jours ago | 0

| accepted

Answered

clock speed and cores

In general, this is impossible to answer. For ultimate speed, you want many cores, a fast clock speed, fast disk access, and a g...

clock speed and cores

In general, this is impossible to answer. For ultimate speed, you want many cores, a fast clock speed, fast disk access, and a g...

7 jours ago | 0

Answered

Bisection method not working. Is my code heading in the right direction?

I had to laugh, as I recognized your coding style from a previous question. Then I remembered your name. Note that not(abs((end...

Bisection method not working. Is my code heading in the right direction?

I had to laugh, as I recognized your coding style from a previous question. Then I remembered your name. Note that not(abs((end...

7 jours ago | 0

Answered

Variance between two vectors

The variance between two vectors is something that seems to be a bit ambiguous in meaning. I can think f at east a couple of way...

Variance between two vectors

The variance between two vectors is something that seems to be a bit ambiguous in meaning. I can think f at east a couple of way...

7 jours ago | 0

Answered

why is my Fixed point iteration method only giving me first iteration. (i included info at the bottom of code and the next few iterations answers)

Think about it. Does p EVER change? Why not? How would you make it change? Inside the loop, we see only this: N=N+1; F=p; p...

why is my Fixed point iteration method only giving me first iteration. (i included info at the bottom of code and the next few iterations answers)

Think about it. Does p EVER change? Why not? How would you make it change? Inside the loop, we see only this: N=N+1; F=p; p...

7 jours ago | 0

| accepted

Answered

Conversion to function_handle from double is not possible.

LOOK AT THE ERROR MESSAGE. Think about what it tells you. Error in RegulaFalsi_Mod (line 21) f(a) = (1/k)*f(a); What ...

Conversion to function_handle from double is not possible.

LOOK AT THE ERROR MESSAGE. Think about what it tells you. Error in RegulaFalsi_Mod (line 21) f(a) = (1/k)*f(a); What ...

8 jours ago | 1

Answered

optimization toolbox

The optimization toolbox has existed for MANY years before 2006. I had a copy in my 1988 release. (Back then, it was called a ve...

optimization toolbox

The optimization toolbox has existed for MANY years before 2006. I had a copy in my 1988 release. (Back then, it was called a ve...

9 jours ago | 1

Answered

Can PLSregress handle no intercept

It is NEVER a good idea to hack toolbox code. The exceptions are where you know enough to be able to write the modified algorit...

Can PLSregress handle no intercept

It is NEVER a good idea to hack toolbox code. The exceptions are where you know enough to be able to write the modified algorit...

9 jours ago | 0

Answered

How can I count the largest number of repeated numbers in a double?

First, this is NOT a double vector. 00000000101100000011110000110000 It might be a string. But if you tried to write that vec...

How can I count the largest number of repeated numbers in a double?

First, this is NOT a double vector. 00000000101100000011110000110000 It might be a string. But if you tried to write that vec...

9 jours ago | 1

Answered

A particular differential equation... why can't I solve it?

Easier than you might think to solve, even with pencil and paper. But sometimes a computer won't see the trick, at least, not wi...

A particular differential equation... why can't I solve it?

Easier than you might think to solve, even with pencil and paper. But sometimes a computer won't see the trick, at least, not wi...

9 jours ago | 0

| accepted

Answered

could anyone help me to solve the issue

Easy enough. Just use setdiff. A=[2 3; 1 4; 2 4; 3 4]; That is, ... B = A; cind = [3 4]; for i ...

could anyone help me to solve the issue

Easy enough. Just use setdiff. A=[2 3; 1 4; 2 4; 3 4]; That is, ... B = A; cind = [3 4]; for i ...

9 jours ago | 0

| accepted

Answered

Main diagonal operations problem

Easy enough, it seems. First, determine the diagonal elements. x = diag(rand(1,4)*.7 + .3); Next, you need to choose the other...

Main diagonal operations problem

Easy enough, it seems. First, determine the diagonal elements. x = diag(rand(1,4)*.7 + .3); Next, you need to choose the other...

9 jours ago | 2

Answered

The accuracy of cumtrapz (numerical integration)????

This is something covered in any basic class that talks about numerical methods. (And why are you using methods about which you ...

The accuracy of cumtrapz (numerical integration)????

This is something covered in any basic class that talks about numerical methods. (And why are you using methods about which you ...

10 jours ago | 2

| accepted

Answered

How to make a variable an even number?

If you just want to check if a variable X is an even number, then just check the value of mod(x,2). If the result is zero, then ...

How to make a variable an even number?

If you just want to check if a variable X is an even number, then just check the value of mod(x,2). If the result is zero, then ...

10 jours ago | 1

Answered

Fitting of raw data

You don't have any simple model that you can use, at least, you have not suggested any. And, even if somebody suggests using pol...

Fitting of raw data

You don't have any simple model that you can use, at least, you have not suggested any. And, even if somebody suggests using pol...

11 jours ago | 0

Answered

I don't know if matlab is calculating this properly

MATLAB is calculating what it calculated properly. The issue is, you told it to calculate the wrong thing. Computers are sooooo ...

I don't know if matlab is calculating this properly

MATLAB is calculating what it calculated properly. The issue is, you told it to calculate the wrong thing. Computers are sooooo ...

11 jours ago | 3

Answered

Linear interpolation in loop

I totally agree with Bob. (By the way, this is not linear interpolation. Interpolation passes exactly through ALL points.) You ...

Linear interpolation in loop

I totally agree with Bob. (By the way, this is not linear interpolation. Interpolation passes exactly through ALL points.) You ...

12 jours ago | 1

| accepted

Answered

Plotting a 2D crystal lattice from two primitive lattice vectors

First, you need to understand that MATLAB does not understand what you intend by this notation: v1= -0.5i + -sqrt(3)/2j Both i...

Plotting a 2D crystal lattice from two primitive lattice vectors

First, you need to understand that MATLAB does not understand what you intend by this notation: v1= -0.5i + -sqrt(3)/2j Both i...

14 jours ago | 0

| accepted