Any automatic curve fitting tool/function for fitting complex nonlinear curves?
조회 수: 2 (최근 30일)
이전 댓글 표시
I require an automatic curve fit function which gives me an equation of fit and the error values(Rsquare, RMSE etc.) for nonlinear one dim. data which I can use in my function. I dont need a GUI based manual fitting.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Matt J
2013년 1월 23일
There is LSQCURVEFIT if you have the optimization toolbox. It gives you the norm of the residuals. Not sure how you want to define RMSE without knowing the true curve.
댓글 수: 3
Matt J
2013년 1월 24일
편집: Matt J
2013년 1월 24일
No, I think you've got the issue wrong. In order to do a meaningful least squares fit, you have to start with an equation of a desired from and then find the parameters of that equation that best fit your data. You can't do a fit first and decide on the equation later.
I doubt that the SPLINE commands are doing what you expect. Note that pp=spline(x,y) will produce a curve passing through ALL your data points, even the outliers that you presumably want your fit to ignore. The equation that the pp output corresponds to is a piecewise polynomial. The way pp represents it is described in
doc mkpp
Normally, you wouldn't work with this equation explicitly. You would use the PPVAL command to evaluate spline at different points.
참고 항목
카테고리
Help Center 및 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!