Optimization of multivariable function

1 visualización (últimos 30 días)
Blanca Castells
Blanca Castells el 17 de Abr. de 2020
Comentada: Blanca Castells el 20 de Abr. de 2020
Hi everybody!
I'm having some trouble trying to optimize a function. I want to minimize the function F defined as:
where Aexp is a vector containing experimental data and Asim is a vector of simulated data. The true problem comes when defining the simulation function:
So the optimization needs to be carried out changing a1, sigma and a2 values in order to make F minimum.
However I'm really stuck as I have been using symbolic functions but turns out the result is always 1. I don't know any other way to use integral fucntions, even if this one does not look like working.
Any ideas? Thanks!
  5 comentarios
Walter Roberson
Walter Roberson el 20 de Abr. de 2020
With that sigma, a1, a2, then the results of Asim are not exactly 0, but they are smaller than 10^(-7000) so double() converts them to 0.
You can, by the way, rewrite:
sigma=5;
a1=1000000;
a2=126;
iarray=linspace(150,400,30);
i1=iarray(1);
syms x y I2
fun1(x,y)=exp(-x/y);
Int1 = int(fun1, y, [i1, I2]);
fun2 = exp((-a1/5)*Int1-(((x-a2)^2)/(2*sigma^2)));
Int2 = int(fun2, x, [0 inf]);
coef=1/(sigma*(2*pi())^0.5);
AAsim = coef*Int2;
aasim = subs(AAsim, I2, iarray);
asim = double(aasim); %fails, values too small for MuPAD to work with
Blanca Castells
Blanca Castells el 20 de Abr. de 2020
I have changed a1 and a2 values, but in order to obtain Asim stimations the values does not make "physical sense". However, thanks for the answer, I'll keep thinking about it and trying to figure out another way to code it :)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by