Sha256: a553255fc73d4db9c220a61ae6c02c2316f3800f2714dfb5f686f5571d19a6f8
Contents?: true
Size: 345 Bytes
Versions: 9
Compression:
Stored size: 345 Bytes
Contents
module SPCore # Produces a Cosine window of a given size (number of samples). # For more info, see https://en.wikipedia.org/wiki/Window_function#Cosine_window. class CosineWindow attr_reader :data def initialize size @data = Array.new size size.times do |n| @data[n] = Math::sin((Math::PI * n)/(size - 1)) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems