Answer the question
In order to leave comments, you need to log in
How to lubricate the line?
There is a set of heights - a one-dimensional array of numbers[1,2,5, ...] , you need to "blur" each point without changing the dimension of the array. It's like a blur, but only for the line. That is, you need to calculate some average of the nearest for each height.
A bicycle is not required, is it?
Answer the question
In order to leave comments, you need to log in
Use a twist.
In the end - you select a window (an array of some length, 3,5,7) whose elements are some coefficients. This window passes through the array. The new array element value is the sum of the weighted elements that fall into the window divided by the length of the window. For example, to calculate the average with neighbors, you need a window [1,1,1]. You just need to decide what to do with the edges. Usually they are either ignored or considered so that the end is followed by the beginning, and vice versa. I hope I explained clearly. If you ask.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question