Appropriate optimization method for solving equation with unknown exponent

2 ビュー (過去 30 日間)
I want to solve for x(1) and x(2). x(2) is exponent. sigmaexp are experimental values. sigmanum are the values which matlab will calculate by varying x(1) and x(2). The optimized values are the one which minimize the expr as shown in the code below.
A = 332.8668;
B = 128.6184;
n = 0.4234;
s = table2array(ExpDataMatlab);%I have imported this data from an .xlsx file
sigmaexp = s(:,2);
eps = s(:,1);
epsdot1 = s(:,3);
x = optimvar('x',2,'LowerBound',[194.651,1.7835],'UpperBound',[12989,14.5453]);
initialpt.x = [6000,7];
expr = optimexpr;
sigmanum = @(x)(A+B*(eps.^n)).*(1+(epsdot1./x(1)).^(1/x(2)));
i = length(sigmaexp);
expr = (1/i)*sum((sqrt((sigmaexp-sigmanum(x)).*conj(sigmaexp-sigmanum(x)))./sigmaexp))*100;
If I run the above code I get the error,
Error using optim.internal.problemdef.operator.PowerOperator
Exponent must be a finite real numeric scalar.
Error in optim.internal.problemdef.Power
One way of tackling this issue is to change sigmanum as follows so that x(2) is no more in power form
sigmanum = @(x)(A+B*(eps.^n)).*(1+exp((1/x(2)).*log(epsdot1./x(1))));
However, this expression is valid only if log(epsdot1./x(1)) > 0. However, this is not the case. Therefore, solver like lsqlin,lsqcurvefit,fmincon, etc. cannot be used. Can you suggest me which optimization method can I use like genetic algorithm, surrogate optimization? Based on that, I will read further and solve my problem. Thank you.

採用された回答

Venkatesh Madhukar Deshpande
Venkatesh Madhukar Deshpande 2021 年 3 月 24 日
It can be solved using genetic algorithm. I found it out.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by