Closed Kangwhi-Kim closed 2 years ago
N = 400 # array length fs = 800 # Sampling frequency T = 1 / fs # Sample interval time x = np.linspace(0.0, N * T, N, endpoint=False) # time y = 3 * np.sin(50.0 * 2.0 * np.pi * x) + 2 * np.sin(80.0 * 2.0 * np.pi * x) signal = y f, x_mag = positive_fft(signal, fs, hann = False, normalization = False, axis = -1) freq = np.around(f[np.where(x_mag > 1)]) freq
Fs -> fs, axix -> axis , false -> False, mag -> x_mag
Fs -> fs, axix -> axis , false -> False, mag -> x_mag