I have an array of values which, when plotted, give this graph.
http://imageshack.us/photo/my-images/15/schermatadel20130215150.png
I need to obtain the equations of the segments that compose it, i.e. subdivide this graph into segments (not exactly, but segments approximating the real values) and obtain the equations of these segments. I think it's called piecewise linear regression.
Is it possible to do it in Matlab?
Thanks in advance.
If you want to input the number of segments, you can indeed try the solution provided on file exchange
However, if you already know where each segment starts and ends, it is not so hard to do it yourself.
Note that your segments will typically not connect end to end if you use this method.