File:Normalized frequency example.svg
Original file (SVG file, nominally 845 × 675 pixels, file size: 29 KB)
Captions
Summary
[edit]DescriptionNormalized frequency example.svg |
English: This is an example of plotting samples of a frequency distribution in the unit "bins", which are integer values. A scale factor of 0.7812 converts a bin number into the corresponding physical unit (hertz). |
|||
Date | ||||
Source | Own work | |||
Author | Bob K | |||
Permission (Reusing this file) |
I, the copyright holder of this work, hereby publish it under the following license:
|
|||
SVG development InfoField | V |
|||
Octave/qt source InfoField | click to expand
graphics_toolkit("qt")
d = 4; % amount to add to text sizes
set(0, "DefaultFigureColor",.94*[1 1 1]) % This coloring between subplots does not show up in the .svg output.
set(0, "DefaultAxesFontsize",12+d) % size of numeric tick labels
set(0, "DefaultTextFontsize",12+d)
T = 0.01; % seconds per sample
sam_per_sec = 1/T;
N = 128; % number of frequency samples
N2 = N/2;
Hz_per_bin = sam_per_sec/N % no semi-colon, so value is displayed in Octave command window
L = 11; % pulse_width (samples)
L2 = (L-1)/2;
s = [ones(1,L) zeros(1,N-L)]; % Zero-fill the signal so a DFT produces N frequency samples.
S = fft(circshift(s,-L2)); % Rotate s() to take advantage of symmetry. S() is therefore real-valued.
hfig = figure("position",[1 1 1000 800]);
subplot(2,1,1)
plot((-N2:N2-1)*T, circshift(s,N2-L2), "linewidth",3) % Center the pulse at 0 seconds.
xlim([-N2 N2-1]*T)
ylim([0 2])
title("Signal", "fontsize",14+d)
xlabel("Actual time (seconds)", "fontsize",12+d)
subplot(2,1,2)
plot(0:N2-1, S(1:N2)) % Plot the discrete-time Fourier transform.
hold on
plot(0:N2-1, S(1:N2), ".", "markersize",12, "color","blue") % Overlay the DTFT samples.
xlim([0 N2-1])
set(gca, "xaxislocation","origin")
set(gca, "xtick",0:10:N2-1) %, "fontsize",12) ~ optional code
title("Fourier transform samples", "fontsize",14+d)
xlabel("Normalized frequency (0.7812 Hz/bin)")
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 19:29, 5 February 2023 | 845 × 675 (29 KB) | Bob K (talk | contribs) | Uploaded own work 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 en.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.
Short title | Figure 1 |
---|---|
Image title | Creator: GL2PS 1.4.2, (C) 1999-2020 C. Geuzaine
For: Octave CreationDate: Sun Feb 05 14:13:00 2023 |
Width | 676pt |
Height | 540pt |