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

bayesopt with equality and inquality constraints

I believe that you have two errors in your formulation. As explained in Constraints in Bayesian Optimization, bayesopt attempts ...

bayesopt with equality and inquality constraints

I believe that you have two errors in your formulation. As explained in Constraints in Bayesian Optimization, bayesopt attempts ...

6 dagen ago | 1

Answered

How to choose DiffMinChange value?

I suggest that you look at When the Solver Might Have Succeeded. In particular, https://www.mathworks.com/help/optim/ug/when-the...

How to choose DiffMinChange value?

I suggest that you look at When the Solver Might Have Succeeded. In particular, https://www.mathworks.com/help/optim/ug/when-the...

6 dagen ago | 1

Answered

Solve optimization problem that iterates on parameters with constraints defined with numerical solutions to differential equations depending on those parameters

Perhaps the example Fit an Ordinary Differential Equation (ODE) can help. Alan Weiss MATLAB mathematical toolbox documentation...

Solve optimization problem that iterates on parameters with constraints defined with numerical solutions to differential equations depending on those parameters

Perhaps the example Fit an Ordinary Differential Equation (ODE) can help. Alan Weiss MATLAB mathematical toolbox documentation...

6 dagen ago | 0

| accepted

Answered

Change the range of potential hyperparameters when optimizing hyperparameter choice using fitrensemble

Looking in the documentation for fitrensemble I find this: ---- Set nondefault parameters by passing a vector of optimizableVa...

Change the range of potential hyperparameters when optimizing hyperparameter choice using fitrensemble

Looking in the documentation for fitrensemble I find this: ---- Set nondefault parameters by passing a vector of optimizableVa...

6 dagen ago | 0

| accepted

Answered

help me to use a gamu/pareto to solve an optimization problem

Your three objective functions are t(1)(x(1) - x(4)),..., and your second condition contains the equations t(1)(x(1) - x(4)) = 0...

help me to use a gamu/pareto to solve an optimization problem

Your three objective functions are t(1)(x(1) - x(4)),..., and your second condition contains the equations t(1)(x(1) - x(4)) = 0...

14 dagen ago | 0

Answered

Only feasible point for intlinprog

Sure, you are free to use the built-in 'savemilpsolutions' output function to collect the solutions, and eiither give a random o...

Only feasible point for intlinprog

Sure, you are free to use the built-in 'savemilpsolutions' output function to collect the solutions, and eiither give a random o...

14 dagen ago | 1

Answered

Multi Objective Optimization with discrete variables ?

Yes, if you are careful to define the creation, mutation, and crossover functions so that all integer variables are integers, an...

Multi Objective Optimization with discrete variables ?

Yes, if you are careful to define the creation, mutation, and crossover functions so that all integer variables are integers, an...

14 dagen ago | 0

| accepted

Answered

how can I get 5 parameters in using the optimization tool of an equation

I would not write the sum of squares explicitly. Instead, formulate your problem as an EquationProblem and solve that. You can h...

how can I get 5 parameters in using the optimization tool of an equation

I would not write the sum of squares explicitly. Instead, formulate your problem as an EquationProblem and solve that. You can h...

14 dagen ago | 0

Answered

How I can solve multivariable optimization problem without Optimization toolbox?

I would solve this in a loop for X = 0, X = 1,..., X = 10. Alan Weiss MATLAB mathematical toolbox documentation

How I can solve multivariable optimization problem without Optimization toolbox?

I would solve this in a loop for X = 0, X = 1,..., X = 10. Alan Weiss MATLAB mathematical toolbox documentation

14 dagen ago | 0

Answered

Fsolve - Equation solved, inaccuracy possible.

I think that you might be going about this the wrong way. If you want to solve an ODE numerically, usually you should use ode45 ...

Fsolve - Equation solved, inaccuracy possible.

I think that you might be going about this the wrong way. If you want to solve an ODE numerically, usually you should use ode45 ...

14 dagen ago | 0

Answered

Optimization problem with intlinprog

You see in the iterative display that the number of integer solutions is reported to be 0. That means that intlinprog did not ye...

Optimization problem with intlinprog

You see in the iterative display that the number of integer solutions is reported to be 0. That means that intlinprog did not ye...

25 dagen ago | 0

| accepted

Answered

how to solve a deflection problem in pavement surface using genetic algorithms.

There are many ways to solve such model-fitting problems. See these examples: https://www.mathworks.com/help/matlab/math/exampl...

how to solve a deflection problem in pavement surface using genetic algorithms.

There are many ways to solve such model-fitting problems. See these examples: https://www.mathworks.com/help/matlab/math/exampl...

25 dagen ago | 0

| accepted

Answered

fminunc stopped because it cannot decrease the objective function along the current search direction.

Please run with the CheckGradients option set to true. I think that you will find that you did not calculate the derivatives cor...

fminunc stopped because it cannot decrease the objective function along the current search direction.

Please run with the CheckGradients option set to true. I think that you will find that you did not calculate the derivatives cor...

25 dagen ago | 0

| accepted

Answered

How do I include a user specified hessian function for fmincon?

If you read the documentation for Including Gradients and Hessians, you will see that the fmincon 'interior-point' algorithm doe...

How do I include a user specified hessian function for fmincon?

If you read the documentation for Including Gradients and Hessians, you will see that the fmincon 'interior-point' algorithm doe...

ongeveer een maand ago | 0

Answered

How can I make sure I am using the right settings for the fmincon function?

You really should slow down to learn the tool that you are using a little bit better. Try working through the Getting Started no...

How can I make sure I am using the right settings for the fmincon function?

You really should slow down to learn the tool that you are using a little bit better. Try working through the Getting Started no...

ongeveer een maand ago | 0

Answered

Truss optimization, genetic algorithm

That statement does not indicate an error. That indicates normal ending of the solver iterations. Congratulations! Alan Weiss ...

Truss optimization, genetic algorithm

That statement does not indicate an error. That indicates normal ending of the solver iterations. Congratulations! Alan Weiss ...

ongeveer een maand ago | 0

| accepted

Answered

Optimisation toolbox (GA)

You might want to refer to the documentation for gamultiobj or to the documentation of multiobjective optimization. Alan Weiss ...

Optimisation toolbox (GA)

You might want to refer to the documentation for gamultiobj or to the documentation of multiobjective optimization. Alan Weiss ...

ongeveer een maand ago | 0

Answered

Export results Optimtool app

To use optimtool, all variables need to be in one vector. See Writing Scalar Objective Functions. To export to the workspace, s...

Export results Optimtool app

To use optimtool, all variables need to be in one vector. See Writing Scalar Objective Functions. To export to the workspace, s...

ongeveer een maand ago | 0

| accepted

Answered

I keep getting the error "NVARS" must be positive integer while implementing GA. please help....

I did not read your code in detail, but the line where you call ga is [x, err_ga] = ga(h, c, ga_opts); Look at the documentati...

I keep getting the error "NVARS" must be positive integer while implementing GA. please help....

I did not read your code in detail, but the line where you call ga is [x, err_ga] = ga(h, c, ga_opts); Look at the documentati...

ongeveer een maand ago | 0

Answered

How to define the objective function to solve an optimization problem with Matlab?

If I understand you correctly, your objective function (the thing you are trying to minimize) is integer-valued. Small changes i...

How to define the objective function to solve an optimization problem with Matlab?

If I understand you correctly, your objective function (the thing you are trying to minimize) is integer-valued. Small changes i...

ongeveer een maand ago | 1

| accepted

Answered

Error with Fmincon nonlinear constraint

Try this, as documented: nlcon = @(x)deal([],F); Alan Weiss MATLAB mathematical toolbox documentation

Error with Fmincon nonlinear constraint

Try this, as documented: nlcon = @(x)deal([],F); Alan Weiss MATLAB mathematical toolbox documentation

ongeveer 2 maanden ago | 2

| accepted

Answered

How to get intlinprog to stop when the answer is good enough?

You can create an intlinprog output function to stop the optimizaiton when the objective function value goes below a set limit s...

How to get intlinprog to stop when the answer is good enough?

You can create an intlinprog output function to stop the optimizaiton when the objective function value goes below a set limit s...

ongeveer 2 maanden ago | 1

| accepted

Answered

Refining mesh size (by having very small mesh size) close to the semi-circular flaw tip - Maximum Principal Stresses and Maximum Shear Stresses

I really don't know, but it is possible that the legacy function adaptmesh would enable you to perform your calculation to the r...

Refining mesh size (by having very small mesh size) close to the semi-circular flaw tip - Maximum Principal Stresses and Maximum Shear Stresses

I really don't know, but it is possible that the legacy function adaptmesh would enable you to perform your calculation to the r...

2 maanden ago | 0

Answered

how can i plot this code into a banana solutiongraph?

Perhaps what you are asking relates to this example: https://www.mathworks.com/help/optim/ug/banana-function-minimization.html ...

how can i plot this code into a banana solutiongraph?

Perhaps what you are asking relates to this example: https://www.mathworks.com/help/optim/ug/banana-function-minimization.html ...

2 maanden ago | 0

Answered

nonlinear optimization constraints problem

I suggest that you ensure that your initial point is feasible, and then insert code into your objective function that first eval...

nonlinear optimization constraints problem

I suggest that you ensure that your initial point is feasible, and then insert code into your objective function that first eval...

2 maanden ago | 0

Answered

How to set up parameter estimation in fmincon

I'm not sure, but I think what you are asking is how to pass several arguments as control variables, and maybe how to pass extra...

How to set up parameter estimation in fmincon

I'm not sure, but I think what you are asking is how to pass several arguments as control variables, and maybe how to pass extra...

2 maanden ago | 0

Answered

why fmincon output solver stopped prematurely when nonlinear constraint seems satisfied

As you see from the first line of the Tolerance Details table, fmincon constraint tolerances are relative, meaning they are meas...

why fmincon output solver stopped prematurely when nonlinear constraint seems satisfied

As you see from the first line of the Tolerance Details table, fmincon constraint tolerances are relative, meaning they are meas...

2 maanden ago | 1

Answered

How to get Lagrange multipliers when using GlobalSearch?

Sorry about that. The only way I know is to rerun fmincon starting from the solution point. It won't take long, and will give yo...

How to get Lagrange multipliers when using GlobalSearch?

Sorry about that. The only way I know is to rerun fmincon starting from the solution point. It won't take long, and will give yo...

2 maanden ago | 1

Answered

Optimizing function of functions

You could use the approach in Generate and Plot a Pareto Front. Or you could try using a multiobjective solver, if you have a Gl...

Optimizing function of functions

You could use the approach in Generate and Plot a Pareto Front. Or you could try using a multiobjective solver, if you have a Gl...

2 maanden ago | 0

| accepted

Answered

I've got a problem with optimization and using a variable for exponent

Optimization Toolbox™ does not support general nonlinear integer programming. Use ga or surrogateopt for nonlinear integer progr...

I've got a problem with optimization and using a variable for exponent

Optimization Toolbox™ does not support general nonlinear integer programming. Use ga or surrogateopt for nonlinear integer progr...

3 maanden ago | 0

| accepted