GPlab Genetic programming toolbox help - user defined function.

1 view (last 30 days)
[EDIT: Thu May 12 23:37:26 UTC 2011 Duplicate Removed - MKF]
Hi,
I am a newbie to GPlab. I am trying to apply genetic programming for coverage optimization of wireless network. I need to implement a function which is specialized form of if-else loop. If "Load" is greater than "Load_threshold" then execute branch 1 else execute branch 2.
I am facing tough time understanding data structure of the 'node'. To be specific, I need to execute right or left branches depending on the condition. What's the pointer for the left and right branches?
I would be greatful if you can help me. Even a simple user defined function code might suffice the purpose.
Thanks in advance.
Richa

Answers (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 20 May 2021
Here is a nice help guide with step-by-step approach. LINK: https://www.mathworks.com/help/gads/example-rastrigins-function.html
You can creat your functions file to be solve with GA using function handle or anonymous function, e.g.:
RAS = @(y)20+y(1)^2+y(2)^2-10*(cos(2*pi*y(1))+cos(2*pi*y(2)));

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!