Fit set of data (x,y) to function with parameter constraints?
1 次查看(过去 30 天)
显示 更早的评论
Hi!
I'm trying to fit set of (x,y) data to y = D*sin(C*arctan{B*x-E(B*x-arctan(B*x))})
with parameter constraint function
C = 1+(1-(2/pi)*arcsin(F/D))
here B,C,D,E are the parameter constants need to find and F is the asymptote of y as x goes to infinity.
I can curve fit data with cftool for the main equation,
searched in internet but cannot find way to get an answer
How to add the constraint parameter functions ?
Thanks for the help. sorry for my knowledge, I'm new to matlab.
3 个评论
Roger Stafford
2017-12-18
The point I was making is that you cannot regard both F and C as quantities that can be independently varied while searching for a fit. As I have said, setting one of them will determine the other. That is because as x approaches infinity, arctan(B*x-E(B*x-arctan(B*x))) will of necessity approach pi/2 assuming B*(1-E)>0, and therefore y will approach D*sin(C*pi/2). This shows that F = D*sin(C*pi/2). Therefore you can regard B, C, D, and E as your variable parameters and F will automatically be satisfied. It is not a separate constraint.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!