Fitness function with more than "x" as an input?

2 views (last 30 days)
I would like to be able to send a data set to my fitness function using the genetic algorithm in the global optimization tool box. Currently I can get this to work as fitness function using the optimization tool:
function ret = func_opt(x)
load('mydata.mat');
....
end
but I would like to do this instead
function ret = func_opt(x,mydata)
...
end
I looking for how this would need to be setup in the optimization tool or with a script. Thank You!

Accepted Answer

Walter Roberson
Walter Roberson on 2 Jan 2013

More Answers (0)

Community Treasure Hunt

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

Start Hunting!