I have multiple, large data sets that I need to acertain the means along certain linear regions. The regions are dileneated by relatively abrupt changes, as shown in the figure below that I manually marked up.
Ultimately I want a 7 element array of the means of each of these regions (aka the y-intercepts as shown). Thoughts? Other types of curve fittings that could help?
A sample data set is attached.
The below code not working for me, and I've tried a variety of max number of changes and threshold levels.
[TF,S1] = ischange(a, 'linear','MaxNumChanges',12);