Community Profile

# Alan Weiss

### MathWorks

Last seen: ein Tag ago Active 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.

All

View badges

#### Content Feed

View by

Answered
How can i multiply each element of structured array
I'm sorry that you are having these problems, but you must realize that all of them are due to size mismatches in your structure...

3 Tage ago | 0

Answered
How can i multiply each element of structured array
You need to extract the correct elements from your structures before using them. I am not sure what you mean to have as an objec...

4 Tage ago | 0

Answered
Optimisation of energy system
Perhaps you will find some inspiration in the example Optimal Dispatch of Power Generators: Problem-Based. Alan Weiss MATLAB m...

5 Tage ago | 0

Answered
my equation has 3 variables but i want to integrate with respect to only one variable ,so that i can optimize the ramaining two from the resulting equation
This seems like a solution. Of course, I don't know what your real bounds are on d and e, so I just guessed. Notice that I used...

5 Tage ago | 0

| accepted

Answered
FMINCON requires all values returned by functions to be of data type double
Generally, in order for us to be able to help you need to report the entire error message that you receive, everything in red. A...

5 Tage ago | 1

Answered
How can I specify a Min LeafSize in a decision tree and also optimize it?
Take a look at the hyperparameter optimization argument of fitctree. You can fit the MinLeafSize parameter. To set the range you...

9 Tage ago | 0

| accepted

Answered
How do we define prob=optimproblem for multiple energy storage systems
Most likely, you should use a single problem, but have multiple variables that represent the batteries' charge levels or whateve...

13 Tage ago | 1

| accepted

Answered
Why almost the same optimization function gives different results?
I am not 100% sure, but my reading of the fitcecoc documentation shows that 'auto' has this description: 'auto' — Use {'Coding'...

15 Tage ago | 0

Answered
How to Setup Surrogate Optimization with Data input
The error is clear: you have just three variables, so the indices of the integer variables have to be in the range 1 through 3. ...

17 Tage ago | 0

Answered
fmincon stopped because the size of the current step is less than the value of the step size tolerance and constraints are satisfied to within the value of the constraint tol
I do not understand what your constraints do. They seem to depend on random numbers, and so change every time they are called. T...

19 Tage ago | 1

Answered
How to use fmincon for multivariable optimisation of a cost function with different levels of sensitivity to different variables?
Usually you should not use DiffMinChange. The more recent version of the option is FiniteDifferenceStepSize. That option accepts...

19 Tage ago | 0

| accepted

Answered
Auto differentiation vs finite differences in optimization toolbox
Yes, finite differences can be faster than AD. Typically, this occurs in situations like yours where the function or functions a...

20 Tage ago | 0

Answered
How optimize multiple responses of dataset ?
I think that you probably want to fit a function to the data, where the function represents the response. Obviously your data do...

23 Tage ago | 0

Answered
How to use fmincon as fminbd with two different variables
I think that you need to understand that fmincon minimizes a function of a single argument, usually called x. The x argument can...

23 Tage ago | 1

| accepted

Answered
Maximum Diversified Porfolio (MDP) fmincon optimization problem doesn't work
You say that x is 12-by-1, yet you write x0 as 1-by-12. That could be the problem. Try x0 = zeros(n_asset,1); % Now x0 is 12-by...

23 Tage ago | 0

Answered
How to prevent fmincon from immediately going to the lower bound of time in a minimum time problem?
I am not sure that I understand exactly what is happening. But it sounds to me as if the nonlinear constraints are not being sat...

24 Tage ago | 0

Answered
how to make nelder mead trajectory gif on matlab
This example might help. Make sure you click the "Open in MATLAB" button to be able to access all the code. Alan Weiss MATLAB ...

26 Tage ago | 0

Answered
How to do optimization?
I am not 100% sure that I understand you, because you have two different definitions of Fr, namely Fr = 0.5: 0.1: 0.9; Fr = m*...

30 Tage ago | 0

Answered
How to follow the progress of fminunc
See the Plot Functions topic. Alan Weiss MATLAB mathematical toolbox documentation

etwa ein Monat ago | 0

| accepted

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

etwa 2 Monate 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...

etwa 2 Monate 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...

etwa 2 Monate 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...

etwa 2 Monate 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

etwa 2 Monate 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

etwa 2 Monate 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...

etwa 2 Monate 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...

etwa 2 Monate 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

etwa 2 Monate 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...

etwa 2 Monate 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

etwa 2 Monate ago | 0