Is there a way to maximize an objective function to find the unknowns in the function?
1 回表示 (過去 30 日間)
古いコメントを表示

I need to find the unknowns, n and m by maximizing r using the equation at the bottom. I have a set of data containing the values of ?, d?/dt, and T but I am not sure how to sum up the y values into ?y as they contain n and m. Is there a way for matlab to solve it? Can someone kindly suggest a solution? Thank you!!
採用された回答
Walter Roberson
2017 年 8 月 20 日
function f = obj(nm, a, da, T)
n = nm(1);
m = nm(2);
x = 1./T;
y = ln(da ./ ((1-a).^n .* a.^m) );
xy = x .* y;
sum_x = sum(x);
sum_y = sum(y);
and so on.
Then you would be optimizing with
a = ... appropriate alpha values
da = ... appropriate values for dalpha/dt
T = .... appropriate values for T
nm0 = randn(1, 2); %starting point for search
best_nm = fminsearch( @(nm) obj(nm, a, da, T), nm0 );
However, I suspect you might want to put some constraints on n and m; if so then you would be more likely to use fmincon()
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!