Borrar filtros
Borrar filtros

How to optimize a multivariable non-linear function?

2 visualizaciones (últimos 30 días)
Csaba
Csaba el 1 de Oct. de 2012
I have a function with several parameters. One of them is a variable and the rest ones should be constants. I want to adjust these constants to make the output value of the function as constant as possible while the variable changes its values in the given range.

Respuesta aceptada

Ryan G
Ryan G el 1 de Oct. de 2012
What is the variable a function of? Time?
Best case, without doing some sort of control system would be to take samples throughout the range. The number of samples would be up to you, and obtain the optimized parameters at those values and then determine how they change over the range.
You could also do something like a parameter sweep or monte carlo simulation where you evaluate the function over and over with random parameters for the constants and choose the best solution.
Depending on the time it takes to evaluate, you could potentially run tens if not hundreds of thousands of evaluations with a PARFOR loop pretty quickly and analyze the results.
  2 comentarios
Csaba
Csaba el 2 de Oct. de 2012
No, the variable is length, and the function is independent from time. I try the parameter sweep with nested loops since as I see monte carlo simulation requires simulink and I do not have it. Thanks.
Ryan G
Ryan G el 2 de Oct. de 2012
You don't require Simulink for monte carlo, you can utilize the method within MATLAB

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Optimization Toolbox 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