Iterable convolution for JavaScript. See docs.
⚠️ Depending on your environment, the code may requireregeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {convolution} from '@iterable-iterator/convolution';
const moving_average = [1/4, 1/4, 1/4, 1/4];
convolution(moving_average, signal); // ...
const first_derivative = [1, -1];
convolution(first_derivative, signal); // ...
const second_derivative = [1, -2, 1];
convolution(second_derivative, signal); // ...