MATLAB: How to set the variables as integers in a Genetic Algorithm Function gagenetic algorithm Hi, Supposing the objective function is @(x)f(x(1),x(2)). I would like to set the variable 'x' as a integer in a Genetic Algorithm Function. How should I do? Is there anyone knowing it? Thanks, Zheng Best Answer http://www.mathworks.com/help/gads/mixed-integer-optimization.htmlNote that there are a number of restrictions on ga()'s operation when you constrain to integer. Related SolutionsMATLAB: Genetic Algorithm (GA) http://www.mathworks.com/help/gads/performing-a-genetic-algorithm-optimization.htmlhttp://www.mathworks.com/help/gads/constrained-minimization-using-ga.htmlhttp://www.mathworks.com/help/gads/mixed-integer-optimization.html MATLAB: Not enough input arguments sol = ga(@fun, nvars, [], [], [], [], lb, ub, [], intcon); Related QuestionHow to assign the value for Integer variable indices in GA toolboxDefining Objective Function in Genetic AlgorithmAnyone knows whether is possible to perfome an optimization with Global Search using only integer inputs
Best Answer