Optimization of multivariable function

조회 수: 1 (최근 30일)
Blanca Castells
Blanca Castells 2020년 4월 17일
댓글: Blanca Castells 2020년 4월 20일
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
Walter Roberson
Walter Roberson 2020년 4월 20일
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 2020년 4월 20일
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 :)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by