Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Hello, I want to ask how to use genetic algorithm programming in matlab. The variable can be an integer from 0 to 1 or a real number from 0 to 1. How to code them? thank you
Hello, I want to ask how to use genetic algorithm programming in matlab. The variable can be an integer from 0 to 1 or a real number from 0 to 1. How to code them? thank you
Can use binary coding, for the integer of 0- 1, obviously can be solved; For real numbers between 0 and 1, they can be mapped to the range of 0 to 1 by decoding. For example, if binary 011is converted into decimal 15, then you can multiply it by 0.0 1 to become 0. 15. The others are similar.