Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Find the slope of a sparse 1 dimensional array

$
0
0

So I have a horizontal array that comes back from a function that looks like this when joined with ", ":

, , 386, 395, , 430

If you imagine it like so by using the column number as x, and the values as y, and removing any blank values:

x, y3, 3864, 3956, 430

You could pass that directly into SLOPE() and get a slope of the trend line for it.

With just the starting array (which could be of any size), how could you create a function to calculate the slope of the trend line.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>