File:Aliasing between a positive and a negative frequency.png

Summary

Description
English: This figure depicts two complex sinusoids, colored gold and cyan, that fit the same sets of real and imaginary sample points. They are thus aliases of each other when sampled at the rate (fs) indicated by the grid lines. The gold-colored function depicts a positive frequency, because its real part (the cos function) leads its imaginary part by 1/4 of one cycle. The cyan function depicts a negative frequency, because its real part lags the imaginary part.
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:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Aliasing%20between%20a%20positive%20and%20a%20negative%20frequency.png
Category:Self-published work
Other versions

Derivative works of this file:  Aliasing between a positive and a negative frequency.svg

Category:Files with derivative versions
File:Aliasing between a positive and a negative frequency.svg is a vector version of this file. It should be used in place of this PNG file when not inferior.Category:Vector version available

File:Aliasing between a positive and a negative frequency.png → File:Aliasing between a positive and a negative frequency.svg

For more information, see Help:SVG.

In other languages
Alemannisch  العربية  беларуская (тарашкевіца)  български  বাংলা  català  нохчийн  čeština  dansk  Deutsch  Ελληνικά  English  British English  Esperanto  español  eesti  euskara  فارسی  suomi  français  Frysk  galego  Alemannisch  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  Ido  italiano  日本語  ქართული  한국어  lietuvių  македонски  മലയാളം  Bahasa Melayu  မြန်မာဘာသာ  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  norsk  occitan  polski  prūsiskan  português  português do Brasil  română  русский  sicilianu  Scots  slovenčina  slovenščina  српски / srpski  svenska  தமிழ்  ไทย  Türkçe  татарча / tatarça  українська  vèneto  Tiếng Việt  中文  中文(中国大陆)  中文(简体)  中文(繁體)  中文(马来西亚)  中文(新加坡)  中文(臺灣)  +/−
New SVG image

PNG development
InfoField
Octave/gnuplot source
InfoField
click to expand

This graphic was created with the help of the following Octave script:

graphics_toolkit gnuplot
gold = [251 159 3]/256;         % arbitrary color choice
sam_per_sec = 1;
T = 1/sam_per_sec;              % sample interval
dt = T/20;                      % time-resolution of continuous functions
cycle_per_sec = sam_per_sec/8;  % sam_per_sec = 8 * cycle_per_sec (satisfies Nyquist)

figure
subplot(3,1,1)
xlim([-2 10])
ylim([-1.3 1.3])

% Plot cosine function
start_time_sec = -2;
stop_time_sec = 10;
x = start_time_sec : dt : stop_time_sec;
y = cos(2*pi*cycle_per_sec*x);
plot(x, y, "color", gold, "linewidth", 4)
box off           % no border around plot please
hold on           % same axes for next 3 plots

% Plot sine function
start_time_sec = 0;
stop_time_sec = 10;
x = start_time_sec : dt : stop_time_sec;
y = sin(2*pi*cycle_per_sec*x);
plot(x, y, "color", gold, "linewidth", 4)

% Sample cosine function at sample-rate (1/T)
start_time_sec = 0;
stop_time_sec = 8;
x = start_time_sec : T : stop_time_sec;
y = cos(2*pi*cycle_per_sec*x);
plot(x, y, "color", "black", ".")

% Sample sine function
y = sin(2*pi*cycle_per_sec*x);
plot(x, y, "color", "black", ".")

set(gca, "xaxislocation", "origin")
set(gca, "yaxislocation", "origin")
set(gca, "xgrid", "on");
set(gca, "ygrid", "off");
set(gca, "ytick", [0]);
set(gca, "xtick", [0:8]);

subplot(3,1,2)
xlim([-2 10])
ylim([-1.3 1.3])
cycle_per_sec2 = cycle_per_sec - sam_per_sec;   % negative frequency

% Re-plot same cosine function on new axes
start_time_sec = -2;
stop_time_sec = 10;
x = start_time_sec : dt : stop_time_sec;
y = cos(2*pi*cycle_per_sec*x);
plot(x, y, "color", gold, "linewidth", 4)
box off
hold on

% Plot other cosine function
start_time_sec = -2;
stop_time_sec = 10;
x = start_time_sec : dt : stop_time_sec;
y = cos(2*pi*cycle_per_sec2*x);
plot(x, y, "color", "cyan", "linewidth", 4)

% Sample cosine functions at sample-rate (1/T)
start_time_sec = 0;
stop_time_sec = 8;
x = start_time_sec : T : stop_time_sec;
y = cos(2*pi*cycle_per_sec*x);
plot(x, y, "color", "black", ".")

set(gca, "xaxislocation", "origin")
set(gca, "yaxislocation", "origin")
set(gca, "xgrid", "on");
set(gca, "ygrid", "off");
set(gca, "ytick", [0]);
set(gca, "xtick", [0:8]);

subplot(3,1,3)
xlim([-2 10])
ylim([-1.3 1.3])

% Re-plot original sine function on new axes
start_time_sec = 0;
stop_time_sec = 10;
x = start_time_sec : dt : stop_time_sec;
y = sin(2*pi*cycle_per_sec*x);
plot(x, y, "color", gold, "linewidth", 4)
box off
hold on

% Plot other sine function
start_time_sec = -2;
stop_time_sec = 10;
x = start_time_sec : dt : stop_time_sec;
y = sin(2*pi*cycle_per_sec2*x);
plot(x, y, "color", "cyan", "linewidth", 4)

% Sample sine functions at sample-rate (1/T)
start_time_sec = 0;
stop_time_sec = 8;
x = start_time_sec : T : stop_time_sec;
y = sin(2*pi*cycle_per_sec*x);
plot(x, y, "color", "black", ".")

set(gca, "xaxislocation", "origin")
set(gca, "yaxislocation", "origin")
set(gca, "xgrid", "on");
set(gca, "ygrid", "off");
set(gca, "ytick", [0]);
set(gca, "xtick", [0:8]);
Category:Aliasing Category:Created with GNU Octave Category:Images with Octave source code Category:Images with Gnuplot source code
Category:Aliasing Category:CC-Zero Category:Created with GNU Octave Category:Files with derivative versions Category:Images with Gnuplot source code Category:Images with Octave source code Category:PNG created with LibreOffice Category:Pages using deprecated source tags Category:Self-published work Category:Vector version available