Curve fitting of data points
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a series of repeated data points that i am trying to fit with a skewed curve. In the graph I am showing one set of the data points which are in blue. The black hand drawn line is the kind of fit i want for my data. I want my fit to be a curve like the one drawn, not a combination of two linear functions or a sawtooth. I have included the data points in text files. Thank you.

댓글 수: 4
Walter Roberson
2018년 7월 19일
편집: Walter Roberson
2018년 7월 19일
That may be true for the input data, but the black line you show us as the desired fit distinctly wobbles back and forth on the x axis, and since that is presented as your desired outcome, the implication could be that you want the output function to have multiple y values for some of the x.
Anyhow... so if a sharp corner is not desired, then what turn radius should be used?
Do you have a model for what you want the function to be like?
채택된 답변
Matt J
2018년 7월 19일
댓글 수: 3
Matt J
2018년 7월 20일
편집: Matt J
2018년 7월 20일
You are only interested in the positive portion of the hyperbola, so you can write that portion as,
y=a*sqrt(1+(x/b)^2);
which will be like the green curve in the image below. You can also rotate your input x,y data about 135 degrees counter-clockwise so that it will also have a corresponding profile like the red lines in the image below.
Now everything is oriented in a familiar way.

추가 답변 (1개)
Walter Roberson
2018년 7월 19일
Have you considered smoothing splines? https://www.mathworks.com/help/curvefit/smoothing-splines.html
참고 항목
카테고리
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!