# Customizing Genetic Algorithm on Matlab

The Matlab version is 2012b. I am trying using the built-in GA functionality through the Optimization Tool GUI on Matlab. I want to use bit string chromosome with a given length (for example L=24) and a given way to map one chromosome to a real number (suppose the objective function is one dimensional). I have been searching the documentation for some time but haven't found anything useful. Can someone give me a clue how to customize the chromosome length and the chromosome-to-real_number mapping?

Consider the 24 bits of your bitstring as a 24-bit number $y$, i.e., a number between zero and 16777215. Then you can get a real number $x$ between zero and one by computing $x=y/2^24=y/16777216$.

• I know the basic stuff about GA, and I have actually written GA code that does work before. So the situation is that I just want to try out the GA functionality on Matlab and I wanted to ask is how to specify the length of the chromosome and the range and the chromosome-to-real_number mapping. – wdg Jan 17 '13 at 16:02