File:FFT py.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 514 × 600 pixels. Other resolutions: 206 × 240 pixels | 411 × 480 pixels | 658 × 768 pixels | 878 × 1,024 pixels | 1,500 × 1,750 pixels.
Original file (1,500 × 1,750 pixels, file size: 113 KB, MIME type: image/png)
File information
Structured data
Captions
Summary
[edit]DescriptionFFT py.png |
English: The first case relates to the smaller than signal length number of FFT points; the second - equal; the last - larger. |
Date | |
Source | Own work |
Author | Kirlf |
PNG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python codeimport numpy as np
from scipy import signal
import matplotlib.pyplot as plt
Nsub = 100 # number of subsequences
w_1 = 20 # frequency of the 1st component of the signal (Hz)
w_2 = 40 # frequency of the 2nd component of the signal (Hz)
a = 1.1 # magnitude of the 1st component of the signal
b = 0.6 # magnitude of the 2nd component of the signal
t = np.array([i for i in range(1,301)])/1000 # time samples (s)
fs = 1 / (t[1]-t[0]) # sampling frequency (Hz)
x = a*np.cos(2*np.pi*w_1*t) + b*np.sin(2*np.pi*w_2*t) # considered signal
N = [len(x)-10, len(x), len(x)+10]
fig, ax = plt.subplots(len(N), 1, constrained_layout=True,\
figsize=(6, 7), dpi=250)
for idx, item in enumerate(N):
FFT = np.fft.fft(x, n=item)
amps = np.abs(FFT) / (len(FFT) / 2)
ax[idx].stem(f[:20], amps[:20])
ax[idx].grid(True)
ax[idx].set_ylabel('Magnitude of the FFT')
plt.xlabel('Frequencies (Hz)')
plt.show()
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 11:30, 21 February 2019 | 1,500 × 1,750 (113 KB) | Kirlf (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on ru.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Horizontal resolution | 98.42 dpc |
---|---|
Vertical resolution | 98.42 dpc |
Software used |