Smoothing Data: различия между версиями
Материал из Поле цифровой дидактики
м Making those two separate sentences would sound better. |
Patarakin (обсуждение | вклад) Нет описания правки |
||
| (не показана 1 промежуточная версия этого же участника) | |||
| Строка 1: | Строка 1: | ||
'''Smoothing data''' = '''сглаживание данных''' is a common way to make graphs and data look neat when visualized. In this tutorial a moving average is demonstrated. | |||
'''Smoothing data''' is a common way to make graphs and data look neat when visualized. In this tutorial a moving average is demonstrated. | |||
== Script == | == Script == | ||
Текущая версия от 06:29, 10 августа 2022
Smoothing data = сглаживание данных is a common way to make graphs and data look neat when visualized. In this tutorial a moving average is demonstrated.
Script
Here is the script:
define Smooth List // Run without screen refresh delete all of [Smoothed v] // Reset the smoothed list set [i v] to (1) // set the counter to 1, start smoothing at the first item of the list repeat (length of [data v]) // iterate through the list set [i2 v] to (1) // set the second counter to 1 repeat (smoothing) set [smoothed v] to ((smoothed)+(item ((i)+(i2)) of [data v])) // average the items on the list to get the smoothed item change [i2 v] by (1) end set [smoothed v] to ((smoothed)/(smoothing)) add (smoothed) to [Smoothed v] // add finished smoothed item to another list change [i v] by (1) // smooth next item end
