Problem with optimizing a function which has indirect variables (variables are a set of data that is generated with the help of another function)

I desperately need to find a way to solve this for my work ,
i have a certain function which calculates the fit of my chosen parameters, i have to find the parameters which gives the min possible fit value
above is the fit function
R(Tn) and I(Tn) is the true data
Rn^(k) and In^(k) are the variables .
Rn^(k) and In^(k) are generated from another function which is as follows
function [Z, phase] = modelMT(resistivities, thicknesses,frequency)
Rn^(k) - real(Z);
In^(k) - imag(Z);
it takes set of resistivities and thicknesses , i need to choose these values for which i get the min of fit function .

3 commentaires

The notation confuses me. R subscript n superscript k appears to be taking the n'th element of R and raising it to the k'th power, R(n)^k. But then is R(Tn) the complete vector R multiplied by the n'th element of T? w subscript R and w subscript I are mysteries. And is Rn^(k) already raised to k? If Rn^k is a vector then real(Z) must be a vector so Z must be a vector, so is modelMT generating that vector of length N even though N is not input in any obvious way? Is the implication that you expect one of the three parameters to modelMT to be a vector?
Sorry about that K there means something different it is not kth power , k is just an indication of type of model that is being used , in depth k=2 means 2 layer model . you can just ignore K there and you can consider it as Rn(Tn) and In(Tn). R(Tn), I(Tn), Rn(Tn), In(Tn) here Tn -- nth period those are vectors which change with time period n= 1,2,3,4.....n
I have a very similar scenario and posted my question about an hour ago. Will let u know if I get any hits.

Connectez-vous pour commenter.

Réponses (1)

I am not completely sure, but it appears that you are trying to minimize a sum of squares. If so, then take a look at lsqnonlin in Optimization Toolbox.
It is often the case that such problems have multiple local solutions. If you want to try to find a global solution, then look at this documentation section using Global Optimization Toolbox.
Alan Weiss
MATLAB mathematical toolbox documentation

1 commentaire

It is minimization of sum of squares but the variables there is a set of data or a vector which is generated by an another function, using the actual variables (i need to find these variables) so that the sum of squares becomes minimum.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by