Lower and upper bounds in optimization technique
Show older comments
Dear all
I have 28 variables, I want to put 14 variables with (lower bound (lb) and upper bound(ub)) and the 14 other without (lower bound (lb) and upper bound(ub))... How can I do that?
thank you in advance.
8 Comments
tahseen alshmary
on 7 Oct 2021
Almost. It is necessary to supply the function names (and spell the function names correctly), and concatenate them using square brackets [] —
lb = [0.05*ones(1,14) zeros(1,14)]
I assume that the first term is supposed to call the ones function, and I completed this by supplying the right square bracket.
.
tahseen alshmary
on 7 Oct 2021
I am not certain that I understand what you want, since ‘not zeroes’ can be anything.
Perhaps substituting Inf in the upper bound or -Inf in the lower bound could do what you want. So for example if you wanted the last three elements of ‘lb’ (in this example) to be -Inf do this —
lb = [0.05*ones(1,14) zeros(1,11) -Inf(1,3)]
.
tahseen alshmary
on 7 Oct 2021
I was a bit mystified.
The same general idea —
lb = [0.05*ones(1,14) 3*ones(1,14)]
.
tahseen alshmary
on 7 Oct 2021
Star Strider
on 7 Oct 2021
As always, my pleasure!
.
Accepted Answer
More Answers (0)
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!