Add experiment
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
N = 1e3 + 1;
|
||||
f_c = 1e6;
|
||||
t = linspace(0, pi / f_c, N);
|
||||
f_s = 1 / N;
|
||||
freqs = (0:N-1) / f_s;
|
||||
x = exp(-1j * 2 * pi * f_c * t);
|
||||
|
||||
subplot(211);
|
||||
plot(t, imag(x));
|
||||
title("x(t) = sin(t)");
|
||||
xlabel("t");
|
||||
ylabel("x(t)");
|
||||
|
||||
x_fft = abs(fft(imag(x)));
|
||||
subplot(212);
|
||||
plot(t, x_fft);
|
||||
title("X(f) = fft(x(t))");
|
||||
xlabel("f");
|
||||
ylabel("X(f)");
|
||||
|
||||
Reference in New Issue
Block a user