V
V
Vladimir Korovin2016-07-06 23:30:24
Algorithms
Vladimir Korovin, 2016-07-06 23:30:24

Algorithm for creating a sequence over multiple values?

There is such a thing in Excel, when you fill in 2 cells, and then select them and drag them down, let's say, values ​​are generated for the following cells. It is necessary to implement something similar, a quick Google search does not give an answer, maybe I’m scoring the wrong keywords. I don’t ask for a ready-made solution, tell me an article that describes the algorithm and the most common filling options. Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2016-07-06
@vakorovin

planetcalc.ru/177 (arithmetic progression)
planetcalc.ru/4193 (geometric progression)
All formulas are described there.

A
Alexey, 2016-07-06
@alsopub

If you need a linear sequence over two values, then everything is simple:
k = N1 - N0
Ni = N0 + k*i

V
Vasily, 2016-07-07
@Foolleren

First, determine the function, for example, using the least squares method, or set it manually (as in the neighboring answers, but nothing else can be done with two points), and then extrapolate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question