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 个评论
Shehara Perera
Shehara Perera 2017-12-18
编辑:Shehara Perera 2017-12-18
Thanks Roger,
but my problem has more than 20 of coefficients like above(implicit functions).
It's hard to get one equation for all
Any suggestions ?
How to minimize (C-2/pi*asin(F/D)) ?
Roger Stafford
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 CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by