Appropriate optimization method for solving equation with unknown exponent
5 次查看(过去 30 天)
显示 更早的评论
Venkatesh Madhukar Deshpande
2021-3-23
回答: Venkatesh Madhukar Deshpande
2021-3-24
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.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!