Please help me to use MATLAB Global Optimization Toolbox

1 visualización (últimos 30 días)
Please help me to use MATLAB Global Optimization Toolbox to use genetic algorithms for curve fitting. For instance, I have a dependent variable that depends on an independent variable and a set of data points. There are 3 parameters to estimate. How can MATLAB Global Optimization Toolbox achieve this?

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Jun. de 2016
Pass the data points into the objective function. http://www.mathworks.com/help/matlab/math/parameterizing-functions.html
  2 comentarios
S Mitra
S Mitra el 25 de Jun. de 2016
Sir, thanks for your answer. But I intend to use genetic algorithms for this estimation. I see no mention of that in the link.
Walter Roberson
Walter Roberson el 25 de Jun. de 2016
Example:
objective_to_pass_to_ga = @(x) your_real_objective_function(x, the_data_points);
nvar = 1;
result = ga(objective_to_pass_to_ga, nvar);
The function handle that you pass to ga has to take only a single input, but it can invoke a different function, passing the single input and any additional fixed parameters.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by