import numpy as np; t = np.arange(0, 2, 0.025); y = np.sin(2 * np.pi * 13.5 * t); f = np.fft.rfftfreq(t.size, 0.025); print(f[np.argmax(np.abs(np.fft.rfft(y)))])
Log in to join the discussion.
Loading…