Optimization of multivariable function
Mostra commenti meno recenti
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 Commenti
Milankumar Padhiyar
il 17 Apr 2020
can you show us how you defined the objective function using symbolic variables ?
Blanca Castells
il 18 Apr 2020
Blanca Castells
il 20 Apr 2020
Modificato: Blanca Castells
il 20 Apr 2020
Walter Roberson
il 20 Apr 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
il 20 Apr 2020
Risposte (0)
Categorie
Scopri di più su Common Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!