File:Onfreq.png
Summary
| Description |
English: This image shows the real and imaginary parts of an oscillating function times the complex exponential with the same oscillation. |
|||
| Date | ||||
| Source | Own work | |||
| Author | Bob K | |||
| Permission (Reusing this file) |
Bob K, the copyright holder of this work, hereby publishes it under the following license:
|
|||
| Other versions |
Own work based on: Onfreq.svg: |
|||
| PNG development | ||||
| Octave/QTplot source | click to expand
This graphic was created by the following Octave script: graphics_toolkit("qt") % has "insert text" option
% standardize the dimensions of all 3 plots
set(0, "DefaultAxesXlim",[-2 +2])
set(0, "DefaultAxesYlim",[-1 +1])
dt = .01;
t = -2:dt:2;
carrier = cos(2*pi*3*t);
envelope = e.^(-pi*t.^2);
signal = carrier.*envelope;
figure("position", [1 1 1500 600]);
subplot(1,3,1)
plot(t, signal)
set(gca, 'xtick', -2:2, 'fontsize',16)
xlabel('t', 'fontsize',24, 'fontweight','normal')
ylabel('oscillates at 3 Hz', 'fontsize',18, 'fontweight','normal')
str = 'f(t) = cos(2\pi 3 t) e^{-\pi t^2}';
title(str,'Interpreter','tex', 'fontsize',28, 'fontweight','normal')
mixer = e.^(-i*2*pi*3*t);
mixed = mixer.* signal;
sum(real(mixed))*dt % integrate the product
subplot(1,3,2)
plot(t, real(mixed))
set(gca, 'xtick', -2:2, 'fontsize',16)
xlabel('t', 'fontsize',24, 'fontweight','normal')
ylabel('Integrates to 0.5', 'fontsize',20, 'fontweight','normal')
str = 'Re( f(t) e^{-i2\pi 3 t} )';
title(str,'Interpreter','tex', 'fontsize',28, 'fontweight','normal')
subplot(1,3,3)
plot(t, imag(mixed))
set(gca, 'xtick', -2:2, 'fontsize',16)
xlabel('t', 'fontsize',24, 'fontweight','normal')
ylabel('Integrates to 0.', 'fontsize',20, 'fontweight','normal')
str = 'Im( f(t) e^{-i2\pi 3 t} )';
title(str,'Interpreter','tex', 'fontsize',28, 'fontweight','normal')
|