I am a novice at MATLAB programming and I was assigned to use TurboGA to test the global minimum of Rastrigin's function. TurboGA is found here - http://www.mathworks.com/matlabcentral/fileexchange/24053-turboga-a-simple-genetic-algorithm-with-a-powerful-performance-enhancing-tweak/content/turboGA.m
How should I proceed?
Thanks.
I'm not sure what you want to know. I suppose you know how to download
TurboGA and try it. The definition of Rastrigin's Function is given here:
http://www.mathworks.com/help/toolbox/gads/bsa_e27.html
If you have Global Optimization Toolbox, simply use rastriginsfcn;
otherwise, it is easy to program.
If I didn't answer your question, please ask again, stating what you
have done and what you still need to know.
Alan Weiss
MATLAB mathematical toolbox documentation
Sorry about that.
I want to find the global minimum/maximum of the Rastrigin function using TurboGA. I don't know where to place the Rastrigin function with two variables inside the TurboGA code. I am a novice in both Matlab and genetic algorithm - and therefore need all the help I can get. If I know how to proceed with the Rastrigin function, then I will be able to test other functions I still need to define later.
Thank you.
Hi Erwin,
As Alan says, if you have access to Global Optimization Toolbox, you can easily find the minimum of Rastrigins function. If you'd like to minimize the Rastrigins function in 2-d, just type the following at the MATLAB command prompt
>> [x, fval, exitflag] = ga(@rastriginsfcn, 2)
For N-d Rastrigins function, just type
>> [x, fval, exitflag] = ga(@rastriginsfcn, N)
There are more details on how to minimize Rastrigins function in the Global Optimization toolbox documentation.
<<http://www.mathworks.com/help/toolbox/gads/f14773.html#f15854>>
If you want to use TurboGA, perhaps you could contact the author of the TurboGA code for an example.
Hope this helps
Best regards,
Paul
Thanks.
Erwin B. Daculan