MATLAB Answers

0

optimization problem using optim prob in matlab

Asked by Omer Hassan on 1 Dec 2019 at 15:45
Latest activity Answered by Dhananjay Kumar on 4 Dec 2019 at 7:04
How can I restrict the optim problem at matlab to produce integers or binary values only? I tried to use binary() operator but it didn't accept it ?

  1 Comment

When you create an optimization variable with the function optimvar of the Optimization Toolbox, you have an option to choose its type as integer and declair its boundaries.

Sign in to comment.

Products


Release

R2018a

1 Answer

Answer by Dhananjay Kumar on 4 Dec 2019 at 7:04

While using optimvar to create variables which would be used in optimization problem constraints, you can specify 'Type' as 'integer' to achieve your purpose.

  0 Comments

Sign in to comment.