Limit subfunctions values in least square curve fitting

조회 수: 1 (최근 30일)
Zine
Zine 2014년 3월 13일
댓글: Matt J 2014년 3월 13일
Hi all,
I have a function like y-theoretical=A*x+(exp(B/C)/ln(Dx)).x and y-experimental are supplied from experiment; where A=f(x,a,b,c,d); B=f(x,a,b,c,d); C=f(x,a,b,c,d); D=f(x,a,b,c,d), I have the upper and lower limits of a,b,c,d that will result to A,B,C,D and then to curve fitting of y-theoretical to y-experimental ,
my question is how to limit the values of A,B,C,D to do not be lower or exceed some specific values like 0<A<0.85; without limiting the lb or ub of a,b,c,d

채택된 답변

Matt J
Matt J 2014년 3월 13일
You will have to use an optimization algorithm which supports nonlinear inequality constraints, e.g., FMINCON.
Or, by analyzing f(), you must find linear or bounds constraints on a,b,c,d that imply desired bounds on A,B,C,D
  댓글 수: 2
Zine
Zine 2014년 3월 13일
Thanks Matt for this very interesting idea, I tried since you answered the question to understand how to use fmincon, in the help it seems exactly what I need, but the A B C D parameters are complex functions of the elementary parameters a b c d ; actually I am trying to solve a physical problem so a b c d are limited by experiment and the values resulting from the combination is also limited so any idea to set up the fmincon for this problem (I was using lsqcurvefit), thanks very much in advance
Matt J
Matt J 2014년 3월 13일
your nonlcon function should look like
function [cineq,ceq]=nonlcon(x)
...computations...
upper=[A,B,C,D]-[A_ub,B_ub,C_ub,D_ub];
lower=[A_lb,B_lb,C_lb,D_lb] -[A,B,C,D];
ceq=[];
cineq=[lower,upper];

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by