Regions of Constant Slope

L

Lex

I have a set of data x, y and want to find regions (or ranges) of "constant"
slope and I want the value of the slope and range x of that "constant" slope.
I'm not exactly sure what I mean by "constant" (note the quotes) but believe
I *may* be able to use RSQ (R-Squared) to define it.

I *believe* I may have to do it in VBA as I want to automate it - but again
- I'm not sure.

Your help is greatly appreciated.

Thank you!
 
T

Tom-S

The slope between data points can be defined by:

slope = (y2 - y1) / (x2 - x1)

So say your x data is in column A (say A2:A11) and y data in column B (say
B2:B11), the slope between the first 2 points can be defined by a formula in
C3:

=(B3-B2)/(A3-A2)

If you drag fill this formula down to C11, it will give you the slope
between successive pairs of data. Any 2 (or more) successive slope values
that are equal define a region of constant slope. (Since any 2 x.y points can
be joined by a straight line - or constant slope - then you really need at
least 3 x,y points which are joined by the same straight line to define a
'region' of constant slope.)

You can graph the data, using a line graph, to get a quick visual
confirmation of these regions.

Regards,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top