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

looking for a solution for an optimization problem

I think that you need to be more careful when trying to follow the example. EITHER use fmincon OR use lsqnonlin, not both. The f...

looking for a solution for an optimization problem

I think that you need to be more careful when trying to follow the example. EITHER use fmincon OR use lsqnonlin, not both. The f...

15 jours ago | 0

Answered

Genetic algorithm gives incorrect output

I suggest that you give an initial population consisting of at least one feasible point, meaning a point that gives a non-NaN va...

Genetic algorithm gives incorrect output

I suggest that you give an initial population consisting of at least one feasible point, meaning a point that gives a non-NaN va...

16 jours ago | 1

Answered

looking for a solution for an optimization problem

You might find this example relevant. If you have a recent MATLAB version, then look at this example. Alan Weiss MATLAB mathem...

looking for a solution for an optimization problem

You might find this example relevant. If you have a recent MATLAB version, then look at this example. Alan Weiss MATLAB mathem...

16 jours ago | 0

| accepted

Answered

Consecutive nested integration (definite/indefinite)

I would try to answer this question by not integrating from 0 to infinity, but instead from 0 to a large value, and then use an ...

Consecutive nested integration (definite/indefinite)

I would try to answer this question by not integrating from 0 to infinity, but instead from 0 to a large value, and then use an ...

23 jours ago | 0

Answered

Solutions of genetic algorithm and globalsearch versus fmincon

See Hessian for an explanation of why the fmincon Hessian return is pretty much useless. If you need the Hessian AND the solutio...

Solutions of genetic algorithm and globalsearch versus fmincon

See Hessian for an explanation of why the fmincon Hessian return is pretty much useless. If you need the Hessian AND the solutio...

23 jours ago | 0

Answered

How to plot the best individual in GA

I am not sure, but it could be that the disparity in the sizes of your components is to blame. I suggest that you scale the firs...

How to plot the best individual in GA

I am not sure, but it could be that the disparity in the sizes of your components is to blame. I suggest that you scale the firs...

23 jours ago | 0

Answered

Problem with fmincon ''number of runs''

fmincon is a gradient-based solver. It attempts to evaluate the gradient of the objective function at each iteration. By default...

Problem with fmincon ''number of runs''

fmincon is a gradient-based solver. It attempts to evaluate the gradient of the objective function at each iteration. By default...

23 jours ago | 1

| accepted

Answered

Dose who know about Optimization with Summation objective function?

Maybe you should update fun to remember the entire sum, not just the final one. And maybe you should name your indices. fun = o...

Dose who know about Optimization with Summation objective function?

Maybe you should update fun to remember the entire sum, not just the final one. And maybe you should name your indices. fun = o...

23 jours ago | 0

| accepted

Answered

Defining constraints in the Quadratic Programming

You can try setting equal upper and lower bounds for those variables. For example, lb = [3, -inf,5]; ub = [3,inf,5]; sets x(1...

Defining constraints in the Quadratic Programming

You can try setting equal upper and lower bounds for those variables. For example, lb = [3, -inf,5]; ub = [3,inf,5]; sets x(1...

environ un mois ago | 1

Answered

gamultiobj save the optimum value and population in each generation (iteration)

You can use a custom output function, as in this example, to record the population and Pareto front. In the State Structure, the...

gamultiobj save the optimum value and population in each generation (iteration)

You can use a custom output function, as in this example, to record the population and Pareto front. In the State Structure, the...

environ un mois ago | 0

Answered

Rate constant estimation and optimization (ODE)

You might find this example or this example to be relevant. Alan Weiss MATLAB mathematical toolbox documentation

Rate constant estimation and optimization (ODE)

You might find this example or this example to be relevant. Alan Weiss MATLAB mathematical toolbox documentation

environ un mois ago | 0

Answered

Undefined function 'prob2struct' for input arguments of type 'sym'

You cannot use symbolic variables directly with Optimization Toolbox™ functions. Either convert your symbolic expressions using ...

Undefined function 'prob2struct' for input arguments of type 'sym'

You cannot use symbolic variables directly with Optimization Toolbox™ functions. Either convert your symbolic expressions using ...

environ 2 mois ago | 0

Answered

Optimization Toolbox - Equality Contraint for matrix inputs

You might find that this type of structured constraint is handled most easily using the problem-based approach. See, for example...

Optimization Toolbox - Equality Contraint for matrix inputs

You might find that this type of structured constraint is handled most easily using the problem-based approach. See, for example...

environ 2 mois ago | 0

Answered

3d plot and optimization

It is hard to plot a function of three variables. For some approaches, see Plot 3-D Solutions and Their Gradients (this uses PDE...

3d plot and optimization

It is hard to plot a function of three variables. For some approaches, see Plot 3-D Solutions and Their Gradients (this uses PDE...

3 mois ago | 0

Answered

Genetic Algorithm hardly converges in a large Integer optimization problem

This type of problem is challenging for ga. If you have a recent MATLAB version, you could try using surrogateopt with integer v...

Genetic Algorithm hardly converges in a large Integer optimization problem

This type of problem is challenging for ga. If you have a recent MATLAB version, you could try using surrogateopt with integer v...

3 mois ago | 0

Answered

How to separate the Hybrid iteration from the MOGA iteration?

You can use a custom output function to store the population and Pareto front at each generation. See Custom Output Function for...

How to separate the Hybrid iteration from the MOGA iteration?

You can use a custom output function to store the population and Pareto front at each generation. See Custom Output Function for...

3 mois ago | 0

Answered

Please help me to write the code of this constraint with optimproblem format 😔🙏

constr = sum((zjkr.*ujrrprim)./(1-vjk),'all') == sum(zjkr,'all'); I am not sure that the right-hand side of what I wrote is the...

Please help me to write the code of this constraint with optimproblem format 😔🙏

constr = sum((zjkr.*ujrrprim)./(1-vjk),'all') == sum(zjkr,'all'); I am not sure that the right-hand side of what I wrote is the...

3 mois ago | 2

| accepted

Answered

Call fitness value plot with custom plot function for MILP problem

I think that it is a mistake to use the genetic algorithm to solve a mixed-integer linear problem. Instead, use intlinprog. To u...

Call fitness value plot with custom plot function for MILP problem

I think that it is a mistake to use the genetic algorithm to solve a mixed-integer linear problem. Instead, use intlinprog. To u...

3 mois ago | 0

| accepted

Answered

fmincon step size and speed

It sounds like you need to use the Global Optimization Toolbox solver patternsearch with a large value of the MeshTolerance opti...

fmincon step size and speed

It sounds like you need to use the Global Optimization Toolbox solver patternsearch with a large value of the MeshTolerance opti...

4 mois ago | 2

| accepted

Answered

Genetic Algorithm fitness value chart

Your problem probably has integer constraints. Maybe nonlinear constraints, too. The solver behaves very differently with tose k...

Genetic Algorithm fitness value chart

Your problem probably has integer constraints. Maybe nonlinear constraints, too. The solver behaves very differently with tose k...

4 mois ago | 1

| accepted

Answered

Can genetic algorithm be used to find two independent optimum operating conditions for predefined input and output ?

It sounds to me as if you are trying to optimize an ODE system, possibly fitting the parameters to an existing function. If I un...

Can genetic algorithm be used to find two independent optimum operating conditions for predefined input and output ?

It sounds to me as if you are trying to optimize an ODE system, possibly fitting the parameters to an existing function. If I un...

4 mois ago | 0

Answered

Minimization of a function with unknown gradient but known sparsity pattern of its hessian

Sorry, I am afraid that the available options don't work efficiently for your case. The HessPattern option is available only for...

Minimization of a function with unknown gradient but known sparsity pattern of its hessian

Sorry, I am afraid that the available options don't work efficiently for your case. The HessPattern option is available only for...

4 mois ago | 0

| accepted

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...

4 mois 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...

5 mois 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...

5 mois 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...

5 mois 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...

5 mois 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...

5 mois 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 ...

5 mois 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. ...

6 mois ago | 0

| accepted