根据Help中的的说明
Note: ga does not enforce bounds to be satisfied when the PopulationType option is 'bitString' or 'custom'.
估计你就是这个问题。
把 population type 设置成默认的 Double vector吧。
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!