Curve fitting to atan function not working
이전 댓글 표시
I have a set of 2x9 data vectors that I need to curve fit to the following function, I've been going at it all day with little to no success, tried limiting upper/lower limits of the coefficients as well as the starting points to something that would resemble the theoritical values to no avail.
Here's what I ended up with: result
For reference, the end result should result in a similar shape to this, a monotonically decreasing function with a limit of 0 as we approach 0 and a limit of -pi as we approch infinity.
I should note that I found the theoritical values using a different model and from that concluded that w0 should be around the 6.3 mark and t (tau) should be about 2.1-2.2
phi_A=[-3.228;1.574;-0.8063;0.02548;1.904;2.87;1.853;-1.824;3.929];
phi_B=[-3.259;-1.466;-3.859;-3.035;-1.18;2.857;1.851;-1.811;0.9015];
omega_A=[4.453;8.348;10.36;11.95;13.19;3.762;2.07;0.4691;7.921];
delta_phi=phi_B-phi_A;
figure(2);
[sorted_omega, asc]=sort(omega_A);
sorted_phi=delta_phi(asc);
plot(sorted_omega,sorted_phi,'bo');
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File 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!




