Fit curves to data
이전 댓글 표시
Hello!
Assume that I have this code:
u0 = pi*4E-7;
I = 5;
N = 1;
X = [ 12.0 ; 8.5 ; 6.0 ; 4.1 ; 3.5 ];
B1 = [ 0.03 ; 0.05 ; 0.1 ; 0.2 ; 0.35 ];
B2= [ 0.07 ; 0.07 ; 0.15 ; 0.24 ; 0.32];
Bex= (B1 + B2)/2;
Bth= 1E5*u0*I*N./(X);
plot(X,Bex,'bo',X,Bth,'r^');
Now, I want to curves to fit data, and their equations not necessery for me now, but it is easy to find them I want that two.
Of course, I do not want to plot like:
plot(X,Bex,'bo-',X,Bth,'r^-');
because the two produced lines are not smooth.
THank you in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!