Community Profile

photo

Alan Weiss


MathWorks

1,761 total contributions since 2011

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.

Contact

Alan Weiss's Badges

  • 36 Month Streak
  • Thankful Level 2
  • Guiding Light
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
neumann boundary condition in diffusion on a disk and ring
I think that you might be making a modeling error. If the flux across the boundaries is zero, then perhaps you should not have t...

1 day ago | 0

Answered
Change the value of a variable between each iteration of fminsearch
I still think that I do not understand what you are really trying to do. But if you wnat to keep two functions equal, then in fm...

9 days ago | 0

Answered
Not enough input arguments for 'bayesopt'?
Please look at the documentation on Bayesian objective functions. The bayesopt solver passes a table to the objective function. ...

10 days ago | 1

Answered
fmincon: interior-point & SQP computational complexity
This question can probably be best estimated by scaling the problem from small to medium to lmedium-arge, running fmincon on all...

12 days ago | 1

Answered
How can I extract function evaluations that happen during iterations (fmincon) ?
The only way I know to do this is to have your objective function either display or write the values as it calculates them. The ...

12 days ago | 0

| accepted

Answered
i need help in optimization toolbox
It is possible that the documentation has enough detail for your purpose: Genetic Algorithm Terminology How the Genetic Algori...

15 days ago | 0

Answered
Use Bayesian Optimization on Existing Database
Do you want to query your database or run your model? If you want to just query your database, input the database into MATLAB an...

16 days ago | 0

Answered
Choosing the best approach to quadratic progamming problem
The differences between the approaches are outlined here. There are several examples of quadratic programming here, both problem...

16 days ago | 0

Answered
Question about an effect of ConstraintTolerance on multiple constraints for GA optimization
Thank you for the clear explanation. You have a difficult nonlinear problem with all integer variables. The solver is struggling...

16 days ago | 1

| accepted

Answered
Sparsity exploitation in optimization
There are several fmincon algorithms, and they each exploit sparsity differently. The term "large-scale" means that an algorithm...

17 days ago | 0

Answered
Algorithm parameter of solve ignored
You are passing the options incorrectly. See this example on the solve function reference page. Alan Weiss MATLAB mathematical...

18 days ago | 0

| accepted

Answered
How to use the decision variables of the optimization problem in if else statement
I do not understand your formulation. You have ll and ul as optimization variables, which is why you are getting the complaints ...

23 days ago | 0

Answered
fmincon with sqp algorithm but without inclduing a gradient
See Benefits of Including Derivatives in the documentation. Alan Weiss MATLAB mathematical toolbox documentation

23 days ago | 1

Answered
Drawing parabolas in pdeModeler
pdeModeler is for 2-D problems, so I assume that you have 2-D geometry. In this case, you can use a parametrized function for 2-...

24 days ago | 0

Answered
Error using fminunc with array as function output and multiple inputs
It is not clear what you are trying to do. Your P(x,T,Tmed) is not a scalar, so it is not clear what it means to minimize it. Y...

24 days ago | 0

Answered
Optimization Problem: Max Sharpe Ratio
Currently, as the documentation clearly states, the problem-based approach does not apply to general nonlinear problems. You mus...

25 days ago | 0

Answered
change stepsize of fmincon
See Set Larger Finite Differences. Also, check that your function returns different values for different inputs. Alan Weiss MA...

30 days ago | 0

Answered
How to write selection function in genetic algorithm(Global Optimization Toolbox: ga)
I am not sure, but I am suspicious of the line GBparents(1,1)=find(expectation==B(1,1)); What makes you think that expectation...

1 month ago | 0

Answered
Convert Problem-Based to Solver-Based Optimization Problem
Coincidentally, that question was asked and answered recently. Bottom line: convert the problem by using prob2struct. Alan Weis...

1 month ago | 0

Answered
How can I write sum(j,x(i,j))=1 in GA ? - please answer please
I am not sure that I understand what you are asking. You seem to know about Aeq and beq and their syntax. Is what you want a way...

1 month ago | 0

Answered
fsolve vs solve and linear equations
I don't know if you are solving with Symbolic Math Toolbox™ or Optimization Toolbox™. If you have numeric equations (not symbol...

1 month ago | 0

Answered
Function 'fzero' display "Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 1.8e+01. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy"
As the warning clearly states, this is not being issues from fzero, but is instead being issued from integral. You should figure...

1 month ago | 0

| accepted

Answered
How to find the minimum of the given function?
Do you have Optimization Toolbox™? If so, I suggest that fminunc might be an appropriate solver. Otherwise, I suggest fminsearch...

1 month ago | 0

| accepted

Answered
Trying to plot results from fmincon
I think that you want your horizontal axis to be the iteration number and your vertical axis to be the x(1) or x(2) value. This...

1 month ago | 0

Answered
Local minima possible. lsqnonlin stopped because the size of the current step is less than the selected value of the step size tolerance.
Perhaps this old example will be helpful. But maybe it is better to use nlparci from Statistics and Machine Learning Toolbox™. ...

1 month ago | 0

Answered
Local minima possible. lsqnonlin stopped because the size of the current step is less than the selected value of the step size tolerance.
Take a look at some suggestions in When the Solver Might Have Succeeded and When the Solver Succeeds. Alan Weiss MATLAB mathem...

1 month ago | 1

| accepted

Answered
Different Bayes Optimization Results
Sorry, it is not clearly documented, but when running Bayesian optimization in parallel, results are not reproducible. You can s...

1 month ago | 2

| accepted

Answered
lsqnonlin with matrices Problem to define the function
As clearly stated in the documentation, "...an objective function ... accepts one input, say x." One input, not a1,a2,a3,a4,b1,b...

1 month ago | 1

| accepted

Answered
Constraints on a set of parameter in the likelihood function with fmincon
I don't understand whether you are optimizing over x, over theta, or over both. If theta is fixed and you are optimizing over x,...

2 months ago | 0

| accepted

Answered
Minimising a matrix function subject to an equality constraint
This looks like a job for fmincon. Your unknown values are the upper (say) triangular elements in y. Create f to handle the up...

2 months ago | 0

Load more