minimizing three cost function simultaneously in matlab

12 Views Asked by At

I intend to minimize the above cost function (CF) using non-linear LS algorithm (fmincon and lsqnonlin) in matlab. the main purpose is estimating SM* and L-VOD* using SMini (intital value for SM) and L-VODini (intital value for L-VOD). in other word, with the second and third terms we try to minimize the estimate value for unknown parameters (SM* and L-VOD*) and their associating intital values at each iteration. I just wondering how can I write and define this cost function at Matlab to understand the second the third term correctly. now I run the following cost function and estimate SM* and L-VOD*. The problem is that while L-VOD* estimations are reasonable values for different datasets I only obtain 0 for SM*. I would be thankful if you could help me with this issue. Any suggestion would be highly appreciated.

Thanks in advance for your help!

function rmse = cost_function3(params, inti_SM, int_VOD, observed_reflectivity, C, T, H_r, theta)
% W = params(1);
% tau_nad = params(2);
modeled_reflectivity = reflectivity_model(params,C, T, H_r, theta);
rmse1   = sum((modeled_reflectivity - observed_reflectivity).^2)/(std(observed_reflectivity).^2);
term1   = (params(1) - inti_SM).^2 / 0.04;
term2   = (params(2) - int_VOD).^2 / 0.04;
rmse    = rmse1 + term1 + term2;
end
0

There are 0 best solutions below