Fit polynomial to data with prescribed second derivative
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi!!
In desperate need for help. I have a set of data for the upper surface of an airfoil. I am trying to fit a polynomial to this set so that I can evaluate the second derivative. The current problem is that basic fitting does not produce great accuracy at the end. What I am trying desperately is to prescribe the second derivative at the left end so that this equals -0.001. I have tried csape(x,y,"second") and tried to place -0.001 everywhere but without much success. I keep getting very strange shapes or error saying that the matrices being concatenated is inconsistent.
What I am doing wrong?
Thanks everybody :(
댓글 수: 0
답변 (3개)
Matt J
2015년 1월 24일
편집: Matt J
2015년 1월 24일
It might be worth having a look at this spline fitting tool,
which provides a pretty convenient and flexible interface for constraints on the derivatives. In particular, one of the input option parameters 'xypp' lets you fix the second derivative at arbitrary points.
댓글 수: 1
John D'Errico
2015년 1월 25일
Of course, I might be biased in agreeing with this suggestion.
Spline models should be preferred to polynomial models anyway. Lower order polynomials are too inflexible too often, and higher order polynomials blow up too easily due to numerical problems.
Unai San Miguel
2017년 3월 15일
The help page for csape says that you would have to use csape(x, [-0.001, y, -0.001], 'second') or csape(x, [-0.001, y, -0.001], [2, 2]) to fit a cubic polynomial spline to (x, y) with second derivative of y wrt to x equal to -0.001 at both ends of x.
But, is this really what you want to do? Are the second derivatives the same at both ends of the upper side of your airfoil?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!