How to define FMINCON Step size ?

1 view (last 30 days)
Hi Guys,
I am doing an optimisation with four design variables X. All four variables must be a positive integers (i.e) not a floating value. I gave diffminchange as 1, but in iterations, FMINCON has floating value for X.
Is there anyway to force FMINCON to increase/decrease by a round number, hence my design variable will always be a round number.
Thanks in advance!!!

Accepted Answer

Alan Weiss
Alan Weiss on 2 Sep 2015
As the documentation states, all Optimization Toolbox solvers except for intlinprog are for continuous variables. If you need discrete variables such as integers, either use intlinprog or use the Global Optimization Toolbox ga function for mixed-integer optimization.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Comment
Selvavignesh
Selvavignesh on 2 Sep 2015
Thanks Alan for response. I am executing the code now with ga.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!