Question Description
I’m working on a mathlab question and need guidance to help me learn.
Question:
undefined
I have six groups of data attached here in a .mat file. I am trying to add a trend line to the center (flat) portion of the scatter plot. Can you help me to add a trendline to all the data plots and show the associated slope value of the trendline?
undefined
I already have the code to plot the data.
undefined
Black line (in the figure below) is the trendline I am trying to fit in the plot. I want to fit trendlines in all the linear regions (almost linear for the 13 and 14 MPa data) and the slope (k) of those trendlines (ideally displayed).
undefined
No need to plot all the trendlines on the same plot. It is okay to plot the trendline in a separate plot with each dataset. As long as the slope of the trendline is displayed. See attached folder for raw data and existing code