Polyfit with Some Coefficients Fixed
조회 수: 17 (최근 30일)
이전 댓글 표시
I want to fit a set of data using polyfit, but I want certain coefficients to have fixed values. E.g., if the data is to be fitted to a second order polynomial,
y(x)=ax^2+bx+c
I want c to always be equal to zero. Is it possible to define constraints on the polyfit or should I just move on to the Curve Fitting Toolbox?
댓글 수: 0
답변 (1개)
Torsten
2018년 10월 19일
For the case you describe, you can use "polyfitn":
https://de.mathworks.com/matlabcentral/fileexchange/34765-polyfitn
Best wishes
Torsten.
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!