To perform one dimensional segmented linear regression, the best tools would be to use those of the Curve Fitting Toolbox.
Using the Curve Fitting Toolbox, break up your data into various segments and then fit the data in a given segment.
For information regarding all of the curve fitting capabilities of MATLAB and various toolboxes, review Technical Note 1508: The Curve Fitting Guide, at the following URL:
For multi-dimensional segmented linear regression, the Statistics Toolbox is better suited to handle this problem. Again, break your data up into segments and use the multi-linear regression capabilities of the Statistics Toolbox.
The choice to split your data into segments should be motivated by an understanding of the underlying characteristics of your problem. The following link describes some of the theory and motivation for segmented linear regression
Best Answer