Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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$.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.