How to make some optimization variables equal to each other?
Show older comments
I want that some spesific variables that are to be optimized, are to be equal to each other.
lets say that i want this: x(1)=x(2), x(3)=x(4)=x(5), x(6)=x(7)
so whatever value x(1) is optimized to, has to have the same value as x(2).
The variables that needs to be equal to each other are separated by the number 0 in a matrix:
A=[x(1), x(2) 0 x(3), x(4), x(5), 0, 0, 0, x(6), x(7) 0];
how to do this aumtomatically in matlab?
1 Comment
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display 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!