Genatic Algorithm input and output in vector form
Show older comments
Hi, I am facing a problem while using Builtin Genatic Algorithm *ga*.
Usually when we run *ga* over fitness function @(x), the variable in fitness function Let say *a* take the value as a=x(1), and other variable b=x(2). So, we have two variables, output of *ga* is 1*2 (array with two elements).
But for my case, istead of using *a=x(1)* i want variable *a* as a vector of 10 rows : a=x(:,1) and similarly the second variable also of 10 rows: *b=x(:,2)*. So, the output of *ga* should be 10*2. Is there any way we can force ga to work with vectors (input and output).
Accepted Answer
More Answers (0)
Categories
Find more on Write Constraints 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!