I write documentation for MATLAB mathematical toolboxes, primarily optimization. I have also written documentation for PDE, statistics, symbolic math, and econometrics.

My pre-MathWorks job was with Bell Labs, primarily in mathematical models of data traffic, with a strong interest in parallel computation and in rare events (large deviations).

I do not provide private consulting. If you have a question, please ask on a public forum such as MATLAB Answers.

Answered

Create time dependent internal heat source for heat transfer problem

I am not sure, but I believe that the answer might be that the solver checks if anything is going on at small times, and then de...

Create time dependent internal heat source for heat transfer problem

I am not sure, but I believe that the answer might be that the solver checks if anything is going on at small times, and then de...

12 days ago | 1

| accepted

Answered

the GA shows the problem with "Failure in initial user-supplied nonlinear constraint function evaluation. "

Please read the documentation on Mixed Integer Optimization. The solver truly does not accept equality constraints along with in...

the GA shows the problem with "Failure in initial user-supplied nonlinear constraint function evaluation. "

Please read the documentation on Mixed Integer Optimization. The solver truly does not accept equality constraints along with in...

15 days ago | 0

Answered

Genetic algorithm plots penalty instead of Fitness

Perhaps you have some integer constraints. If not, please show us your options and ga call. Alan Weiss MATLAB mathematical to...

Genetic algorithm plots penalty instead of Fitness

Perhaps you have some integer constraints. If not, please show us your options and ga call. Alan Weiss MATLAB mathematical to...

15 days ago | 0

| accepted

Answered

Parameter estimation of a set of ODE

I'm not sure how your function is given to MATLAB. But suppose that it is in a function file PofT.m. You simply have to include...

Parameter estimation of a set of ODE

I'm not sure how your function is given to MATLAB. But suppose that it is in a function file PofT.m. You simply have to include...

16 days ago | 0

Answered

Solving simultaneous equations with fmincon (Error:Not enough input arguments / Supplied objective function must return a scalar value.)

I think that you are making life hard for yourself by using symbolic variables instead of using plain numeric variables and func...

Solving simultaneous equations with fmincon (Error:Not enough input arguments / Supplied objective function must return a scalar value.)

I think that you are making life hard for yourself by using symbolic variables instead of using plain numeric variables and func...

16 days ago | 0

Answered

Display/Plot Functions for Genetic Algorithm seemingly not working when I include nonlinear constraint

When you use a nonlinear constraint function, ga uses a different algorithm that takes many, many more iterations internally tha...

Display/Plot Functions for Genetic Algorithm seemingly not working when I include nonlinear constraint

When you use a nonlinear constraint function, ga uses a different algorithm that takes many, many more iterations internally tha...

16 days ago | 0

Answered

Result of fmincon()

The returned values are within the constraint tolerance. See Tolerances and Stopping Criteria. Alan Weiss MATLAB mathematical ...

Result of fmincon()

The returned values are within the constraint tolerance. See Tolerances and Stopping Criteria. Alan Weiss MATLAB mathematical ...

16 days ago | 2

Answered

fmincon works but GA won't work

In general, ga is not as reliable a solver as fmincon. So if you have smooth objective and constraints, you should use fmincon. ...

fmincon works but GA won't work

In general, ga is not as reliable a solver as fmincon. So if you have smooth objective and constraints, you should use fmincon. ...

2 months ago | 0

| accepted

Answered

how to optimize my ODE system using fmincon

Take a look at the examples Fit an ODE to Data and Optimize an ODE in Parallel (the latter example uses Global Optimization Tool...

how to optimize my ODE system using fmincon

Take a look at the examples Fit an ODE to Data and Optimize an ODE in Parallel (the latter example uses Global Optimization Tool...

2 months ago | 0

| accepted

Answered

Duplicate points evaluated in Bayesian Optimization

As you can see from the algorithm description, there is nothing that prevents multiple evaluations of the same points. So it is ...

Duplicate points evaluated in Bayesian Optimization

As you can see from the algorithm description, there is nothing that prevents multiple evaluations of the same points. So it is ...

2 months ago | 0

Answered

How can I find a Pareto optimal using weighted sum method in Multi objective optimization ?

There are several approaches to finding Pareto fronts. This example uses fgoalattain, but you can easily modify it to use fminun...

How can I find a Pareto optimal using weighted sum method in Multi objective optimization ?

There are several approaches to finding Pareto fronts. This example uses fgoalattain, but you can easily modify it to use fminun...

2 months ago | 0

Answered

Linear programming and cash flow matching

I don't know for sure, but perhaps this example is relevant. Alan Weiss MATLAB mathematical toolbox documentation

Linear programming and cash flow matching

I don't know for sure, but perhaps this example is relevant. Alan Weiss MATLAB mathematical toolbox documentation

2 months ago | 0

Answered

how to plot objective function with variables

You have two definitions of options, meaning the first definition does nothing: options = optimoptions(@fmincon,'Display','iter...

how to plot objective function with variables

You have two definitions of options, meaning the first definition does nothing: options = optimoptions(@fmincon,'Display','iter...

2 months ago | 1

Answered

why ga generates different fval and penalty values

Most likely, your x value is infeasible. See Integer ga Algorithm, which states: The penalty function value of a member of a po...

why ga generates different fval and penalty values

Most likely, your x value is infeasible. See Integer ga Algorithm, which states: The penalty function value of a member of a po...

2 months ago | 0

Answered

Converting optimization output to struct

You might be interested in the function mapSolution. You need to make the problem structure, but then, given the x output from c...

Converting optimization output to struct

You might be interested in the function mapSolution. You need to make the problem structure, but then, given the x output from c...

2 months ago | 1

Answered

How to use parallel computation in globalsearch function?

I think that you are confused about what GlobalSearch and MultiStart do. Bottom line: I think that you should not use GlobalSear...

How to use parallel computation in globalsearch function?

I think that you are confused about what GlobalSearch and MultiStart do. Bottom line: I think that you should not use GlobalSear...

2 months ago | 0

Answered

fmincon does not progress first and then progress but at a rather slow rate

I have no details about what your objective function or constraints look like, so cannot offer any specific advice. For general ...

fmincon does not progress first and then progress but at a rather slow rate

I have no details about what your objective function or constraints look like, so cannot offer any specific advice. For general ...

3 months ago | 0

Answered

Question regarding the GA optimization

You are free to use nonlinear inequality constraints along with mixed-integer programming in ga. Alan Weiss MATLAB mathematica...

Question regarding the GA optimization

You are free to use nonlinear inequality constraints along with mixed-integer programming in ga. Alan Weiss MATLAB mathematica...

3 months ago | 0

Answered

how to optimize a function which optimization variable is not in it directly?

This looks like a binary programming problem. I don't know how the D_m depend on the I_{n,k}, but it looks like there is no big ...

how to optimize a function which optimization variable is not in it directly?

This looks like a binary programming problem. I don't know how the D_m depend on the I_{n,k}, but it looks like there is no big ...

3 months ago | 2

Answered

Problem optimizing anonymous function using fzero

The way that fzero works is it first tries to bracket a root (find points on either side of the root having different function s...

Problem optimizing anonymous function using fzero

The way that fzero works is it first tries to bracket a root (find points on either side of the root having different function s...

4 months ago | 0

Answered

search the minimum of function by sse

I think that the documentation on Minimizing Functions of Several Variables will help. Alan Weiss MATLAB mathematical toolbox ...

search the minimum of function by sse

I think that the documentation on Minimizing Functions of Several Variables will help. Alan Weiss MATLAB mathematical toolbox ...

5 months ago | 0

| accepted

Answered

Calculating covariance matrix from Jacobian using lsqcurvefit

This old documentation example might be of some use. Alan Weiss MATLAB mathematical toolbox documentation

Calculating covariance matrix from Jacobian using lsqcurvefit

This old documentation example might be of some use. Alan Weiss MATLAB mathematical toolbox documentation

5 months ago | 1

| accepted

Answered

Optimizing a matrix with cplexlp?

I really don't know, but it is possible that the matchpairs function might be applicable. Alan Weiss MATLAB mathematical toolb...

Optimizing a matrix with cplexlp?

I really don't know, but it is possible that the matchpairs function might be applicable. Alan Weiss MATLAB mathematical toolb...

5 months ago | 1

Answered

Number of Population and Generation in GA?

it is difficult for me to understand what you are asking, but here is some information that might help you: You can see option ...

Number of Population and Generation in GA?

it is difficult for me to understand what you are asking, but here is some information that might help you: You can see option ...

5 months ago | 0

| accepted

Answered

How can i find the optimal parameters that minimize SSE?

I think that you did not understand the comment about not loading the data within your objective function. You should load it on...

How can i find the optimal parameters that minimize SSE?

I think that you did not understand the comment about not loading the data within your objective function. You should load it on...

6 months ago | 0

Answered

How can i find the optimal parameters that minimize SSE?

To solve an optimization problem you have to force your problem into the form required by optimization solvers. Sorry, that's ju...

How can i find the optimal parameters that minimize SSE?

To solve an optimization problem you have to force your problem into the form required by optimization solvers. Sorry, that's ju...

6 months ago | 1

Answered

is it possible to determine the values of the input parameters ca, cb, cc and cd for which the cc value at the output would be maximal?

Yes, take a look at this example, which has a much more complicated objective function. If your objective function is only the v...

is it possible to determine the values of the input parameters ca, cb, cc and cd for which the cc value at the output would be maximal?

Yes, take a look at this example, which has a much more complicated objective function. If your objective function is only the v...

6 months ago | 0

Answered

Travelling salesman problem - Detecting subtour

If you have an Optimization Toolbox™ license, take a look at this example, which has code that does what you ask. Access the cod...

Travelling salesman problem - Detecting subtour

If you have an Optimization Toolbox™ license, take a look at this example, which has code that does what you ask. Access the cod...

6 months ago | 0

Answered

Optimization with very flat objective function

You can try scaling the function by multiplying it by a large value. You can also set some different options, such as TolFun. An...

Optimization with very flat objective function

You can try scaling the function by multiplying it by a large value. You can also set some different options, such as TolFun. An...

6 months ago | 0

| accepted

Answered

Resolution of optimization variable in nonlinear optimization problem like simulannealbnd patternsearch

For patternsearch you can set the MeshTolerance option to 1/2 or something like that.If your objective function is very expensiv...

Resolution of optimization variable in nonlinear optimization problem like simulannealbnd patternsearch

For patternsearch you can set the MeshTolerance option to 1/2 or something like that.If your objective function is very expensiv...

6 months ago | 0