MATLAB: Genetic algorithm viewing population

fmincongagenetic algorithmMATLABoptimization

I am using genetic algorithm on a string of 1s and 0s to solve an optimization problem. For this I have to pass the string generated to a function to check its feasibility. How can I store the population (i.e. the strings in every generation) and pass it to the function.

Best Answer

The objective function is automatically passed the current bitstring as a vector of double, values 0 and 1. You can pass that vector to a different function.