MATLAB Answers

Mesh Adaptive Direct Search

21 views (last 30 days)
Sushrut Dandawate
Sushrut Dandawate on 10 Dec 2020
Answered: Alan Weiss on 13 Dec 2020
I am using pattern search specifically Mesh Adaptive Direct Search for solving a combined control and design problem with 2 design variables and 1 control variable discretized into 20 points between time 0 and 1.
I get a different answer every time. Is it possible to change the options from stochastic to deterministic so that I get the same optimum function value each time?
Also, I use ODE1 for simulation of the dynamic equation. I need to interpolate those simulated points into 20 equispaced points corresponding to the 20 equispaced time stamps. For interpolation, I am using interp1. I get all other values correct but the first value and the last value seems to be odd since the first value is very high and the last value is very low with respect to the other values. I appreciate any help in resolving this.

  0 Comments

Sign in to comment.

Answers (1)

Alan Weiss
Alan Weiss on 13 Dec 2020
Before calling patternsearch first set the pseudorandom number generator:
rng default % Or any other fixed rng value
As for your interpolation issue, I do not understand what you are seeing, sorry.
Alan Weiss
MATLAB mathematical toolbox documentation

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!