Appropriate optimization method for solving equation with unknown exponent
1 view (last 30 days)
Show older comments
Venkatesh Madhukar Deshpande
on 23 Mar 2021
Answered: Venkatesh Madhukar Deshpande
on 24 Mar 2021
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!