Lower and upper bounds in optimization technique
显示 更早的评论
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 个评论
tahseen alshmary
2021-10-7
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
2021-10-7
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
2021-10-7
I was a bit mystified.
The same general idea —
lb = [0.05*ones(1,14) 3*ones(1,14)]
.
tahseen alshmary
2021-10-7
Star Strider
2021-10-7
As always, my pleasure!
.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surrogate Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!