Question
Curve fitting as a combination of straight line segments
- October 16, 2019
- 5 replies
- 8894 views
Hello
I would like to convert a given set of data to a segment of straight lines, rather than a perfect curve. For example, in the attached picture, I would like to convert the data for the sine curve into a set of straight line. Two examples are illustrated in the attachment. One is an approximation connecting the peaks and zeros and the other is more refined approximation. If I use the regression (least square method) on the sine curve, I get a horizontal line.
Question: how to convert the given sine curve data into a set of lines and make them more refined, i.e., with the help of some refining variable.

