Polynominal Fitting Constrained in 1 Coefficient
이전 댓글 표시
x = [0;7.8438;15.6493;23.4767;31.2822;39.0986;46.9123];
y = [1;0.8990;0.7102;0.5747;0.4717;0.3766;0.2956];
p = polyfit(x,y,5); % coefficient-set p in polynominal function f(x) = p(6)*x^5 + p(5)*x^4 + ... + p(1)
y_hat = polyval(p,x);
Here y_hat(1) is 1.0001, i.e. f(0) = 1.0001
I would like to fit a 5deg polynominal to y,x subject to the constraint that f(0) = 1 exactly.
I suspect its a case for fmincon, any other ideas? (I don't want to use splines)
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polynomials에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!