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

Way to overcome tolerance limit restriction, without change in initial value in fsolve function OR any other way out.

I'm not sure what you are trying to do, because apparently the initial point is a solution. But if you want fsolve to take a fut...

Way to overcome tolerance limit restriction, without change in initial value in fsolve function OR any other way out.

I'm not sure what you are trying to do, because apparently the initial point is a solution. But if you want fsolve to take a fut...

etwa 8 Stunden ago | 0

Answered

Performance of Mixed-integer linear programming (MILP) with intlinprog

MILP is a notoriously difficult problem type. For suggestions, see Tuning Integer Linear Programming. Alan Weiss MATLAB mathem...

Performance of Mixed-integer linear programming (MILP) with intlinprog

MILP is a notoriously difficult problem type. For suggestions, see Tuning Integer Linear Programming. Alan Weiss MATLAB mathem...

3 Tage ago | 1

Answered

Assigning different upper and lower bounds to function input variables when calling the function during optimization

You need to write your function of one variable, say x = [x1,x2,x3,x4,x5]. For example, function RMSE = energy_demand(x) % Here...

Assigning different upper and lower bounds to function input variables when calling the function during optimization

You need to write your function of one variable, say x = [x1,x2,x3,x4,x5]. For example, function RMSE = energy_demand(x) % Here...

3 Tage ago | 0

Answered

What acquisition function should I use in Bayes Optimization?

For information about acquisition functions, see Acquisiton Function Types. Alan Weiss MATLAB mathematical toolbox documentati...

What acquisition function should I use in Bayes Optimization?

For information about acquisition functions, see Acquisiton Function Types. Alan Weiss MATLAB mathematical toolbox documentati...

7 Tage ago | 1

| accepted

Answered

How do I solve two ode (dct/dt and dR/dt) simultaneously with ODE45 and optimize two parameters using global optimization ?

For a relevant example, see Optimize an ODE in Parallel. Alan Weiss MATLAB mathematical toolbox documentation

How do I solve two ode (dct/dt and dR/dt) simultaneously with ODE45 and optimize two parameters using global optimization ?

For a relevant example, see Optimize an ODE in Parallel. Alan Weiss MATLAB mathematical toolbox documentation

8 Tage ago | 0

Answered

Need some help about optimization with matlab and simulink.

For a relevant example, see lsqnonlin with a Simulink® Model. Alan Weiss MATLAB mathematical toolbox documentation

Need some help about optimization with matlab and simulink.

For a relevant example, see lsqnonlin with a Simulink® Model. Alan Weiss MATLAB mathematical toolbox documentation

8 Tage ago | 0

Answered

difference between Optimization terminated: maximum number of generations exceeded and Optimization terminated: average change in the fitness value less than .

1 means that the process has stalled, and whether this is good or bad depends on what you want. If the stall window is large, th...

difference between Optimization terminated: maximum number of generations exceeded and Optimization terminated: average change in the fitness value less than .

1 means that the process has stalled, and whether this is good or bad depends on what you want. If the stall window is large, th...

10 Tage ago | 0

Answered

Problem-Based Optimization, No feasible solution found

Your problem is infeasible as given. Using the routines in Investigate Linear Infeasibilities, I found the following. Convert th...

Problem-Based Optimization, No feasible solution found

Your problem is infeasible as given. Using the routines in Investigate Linear Infeasibilities, I found the following. Convert th...

12 Tage ago | 0

| accepted

Answered

Input user data into Surrogate Optimization Function

To pass extra parameters see Passing Extra Parameters. Alan Weiss MATLAB mathematical toolbox documentation

Input user data into Surrogate Optimization Function

To pass extra parameters see Passing Extra Parameters. Alan Weiss MATLAB mathematical toolbox documentation

12 Tage ago | 0

| accepted

Answered

How to set a boundary condition to my solution of the fitness function? (MATLAB genetic algorithm)

I believe that your optimization will work much better using patternsearch as the solver instead of ga, or even using surrogateo...

How to set a boundary condition to my solution of the fitness function? (MATLAB genetic algorithm)

I believe that your optimization will work much better using patternsearch as the solver instead of ga, or even using surrogateo...

12 Tage ago | 1

Answered

Can you help me with the output of my optimizer?

Use this example as a guide: Example of a Nested Output Function. Alan Weiss MATLAB mathematical toolbox documentation

Can you help me with the output of my optimizer?

Use this example as a guide: Example of a Nested Output Function. Alan Weiss MATLAB mathematical toolbox documentation

12 Tage ago | 0

Answered

fmincon options settings mrsgarch

Here are some options you can try (some of your values do not make sense, such as having MaxIter be greater than MaxFunEvals, or...

fmincon options settings mrsgarch

Here are some options you can try (some of your values do not make sense, such as having MaxIter be greater than MaxFunEvals, or...

17 Tage ago | 0

| accepted

Answered

How exactly is the merit function weight 'w' cycled in the surrogateopt function algorithm?

Each sample point uses one weight (one merit function at any one time). The weights cycle after every new point is generated. A...

How exactly is the merit function weight 'w' cycled in the surrogateopt function algorithm?

Each sample point uses one weight (one merit function at any one time). The weights cycle after every new point is generated. A...

20 Tage ago | 0

Answered

Why do I receive local exitflag -10 when I am using multistart?

The MultiStart run exit flags are described here. You see that –10 means the initial points that MultiStart tried all led to Inf...

Why do I receive local exitflag -10 when I am using multistart?

The MultiStart run exit flags are described here. You see that –10 means the initial points that MultiStart tried all led to Inf...

21 Tage ago | 0

Answered

Incorrectly reported Func-count in lsqcurvefit. Also, MaxIterations not obeyed

Thank you for reporting this odd behavior, Matt. I investigated and found that an internal check for stopping in the nonlinear l...

Incorrectly reported Func-count in lsqcurvefit. Also, MaxIterations not obeyed

Thank you for reporting this odd behavior, Matt. I investigated and found that an internal check for stopping in the nonlinear l...

22 Tage ago | 1

Answered

Change axis of fcontour plot

The function reference page for fcontour shows at least two ways of choosing the contour lines: Use the LevelList name-value ar...

Change axis of fcontour plot

The function reference page for fcontour shows at least two ways of choosing the contour lines: Use the LevelList name-value ar...

22 Tage ago | 1

| accepted

Answered

Nonlinear Optimization with 2 Variables, 1 variable is always equal limit

Your problem has costs in terms of the problem variables of the form cost = days*welders*positive + days*positive2; Here posit...

Nonlinear Optimization with 2 Variables, 1 variable is always equal limit

Your problem has costs in terms of the problem variables of the form cost = days*welders*positive + days*positive2; Here posit...

24 Tage ago | 0

Answered

In Matlab 2019, 2020, or 2021, can parallel computing be used with intlinprog?

No, there is no provision for parallel computation in intlinprog. You can always check the Release Notes to find what has change...

In Matlab 2019, 2020, or 2021, can parallel computing be used with intlinprog?

No, there is no provision for parallel computation in intlinprog. You can always check the Release Notes to find what has change...

25 Tage ago | 0

| accepted

Answered

How to formulate nonlinear optimization problem with large number of variables and constraints

It sounds to me as if you want to fit an expression to data, possibly in a least-squares sense. For examples and details, see No...

How to formulate nonlinear optimization problem with large number of variables and constraints

It sounds to me as if you want to fit an expression to data, possibly in a least-squares sense. For examples and details, see No...

25 Tage ago | 0

Answered

FMINCON with multiple constraints

I think that your fracturade function is returning data type SINGLE. Perhaps the quickest fix is to include the following call j...

FMINCON with multiple constraints

I think that your fracturade function is returning data type SINGLE. Perhaps the quickest fix is to include the following call j...

25 Tage ago | 0

| accepted

Answered

Function evaluations (F-count) in fmincon

Please see the documentation on Iterations and Function Counds. To quote the relevant paragraph: If the problem has constraints...

Function evaluations (F-count) in fmincon

Please see the documentation on Iterations and Function Counds. To quote the relevant paragraph: If the problem has constraints...

26 Tage ago | 0

| accepted

Answered

MultiStart runs less than specified number of runs

This can happen when the StartPointsToRun property in ms is not 'all'. In that case, many start points can be skipped in a run b...

MultiStart runs less than specified number of runs

This can happen when the StartPointsToRun property in ms is not 'all'. In that case, many start points can be skipped in a run b...

26 Tage ago | 1

| accepted

Answered

Problems using function fsolve

Check the suggestions in fsolve Could Not Solve Equation. Alan Weiss MATLAB mathematical toolbox documentation

Problems using function fsolve

Check the suggestions in fsolve Could Not Solve Equation. Alan Weiss MATLAB mathematical toolbox documentation

26 Tage ago | 0

Answered

4 variables problem optimization with Genetic Algorithm

ga is a stochastic algorithm, and is expected to give different results on different runs. You can get reproducible behavior by ...

4 variables problem optimization with Genetic Algorithm

ga is a stochastic algorithm, and is expected to give different results on different runs. You can get reproducible behavior by ...

etwa ein Monat ago | 1

| accepted

Answered

Lsqnonlin optimization unexpected behavior

lsqnonlin is a gradient-based solver. It first attempts to estimate the local gradient by small finite difference steps. If your...

Lsqnonlin optimization unexpected behavior

lsqnonlin is a gradient-based solver. It first attempts to estimate the local gradient by small finite difference steps. If your...

etwa ein Monat ago | 0

Answered

Which optimization tool should I use for my case?

I'm not sure that I understand what you are doing, but I think that you could use the fminbnd solver along with some interpolati...

Which optimization tool should I use for my case?

I'm not sure that I understand what you are doing, but I think that you could use the fminbnd solver along with some interpolati...

etwa ein Monat ago | 0

| accepted

Answered

How to increase accuracy of optimization using genetic algorithm of the following code? Value obtained by ga = -2360 (approx.) and Actual value is = -2390. Percentage of accuracy by ga = 98.7%

You are getting a pretty good answer from the wrong solver. Your objective and constraints are all smooth, so you should not be ...

How to increase accuracy of optimization using genetic algorithm of the following code? Value obtained by ga = -2360 (approx.) and Actual value is = -2390. Percentage of accuracy by ga = 98.7%

You are getting a pretty good answer from the wrong solver. Your objective and constraints are all smooth, so you should not be ...

etwa ein Monat ago | 0

| accepted

Answered

Multi objective Bayesopt in MATLAB

There is no provision for using bayesopt for multiobjective problems. You have several choices: Use bayesopt as the optimizer i...

Multi objective Bayesopt in MATLAB

There is no provision for using bayesopt for multiobjective problems. You have several choices: Use bayesopt as the optimizer i...

etwa ein Monat ago | 0

Answered

Problem-Based Optimisation - "Linprog stopped because it exceeded its allocated memory"

Sorry, I do not know why the default algorithm gives this error. The 'interior-point' algorithm solves it easily. dt = 15/60; ...

Problem-Based Optimisation - "Linprog stopped because it exceeded its allocated memory"

Sorry, I do not know why the default algorithm gives this error. The 'interior-point' algorithm solves it easily. dt = 15/60; ...

etwa ein Monat ago | 0

| accepted

Answered

How can I define fitness limit for multiple objectives when using gamultiobj

You can set Nonlinear Constraints in gamultiobj to keep the objective functions within the limits you like. Or you can simply po...

How can I define fitness limit for multiple objectives when using gamultiobj

You can set Nonlinear Constraints in gamultiobj to keep the objective functions within the limits you like. Or you can simply po...

etwa 2 Monate ago | 0

| accepted