Let 𝒙(𝒏) = 𝟎. 𝟗 𝒆
𝒋𝝅𝒏
𝟑 , 𝟎 ≤ 𝒏 ≤ 𝟏𝟎.
Determine 𝑿(𝒆
𝒋𝝎 ) mathematically and write the code for the signal
source Code
n = 0:10;
x = (0.9*exp((1i*pi*n/3)));
k = -300:300;
w = (pi/200)*k;
X = x*(exp(-1i*pi/100)).^(n'*k);
magX = abs(X);
angX = angle(X);
realX = real(X);
imagX = imag(X);
subplot(2,2,1);
plot(w/pi,magX, 'r');
grid on;
xlabel('Time');
ylabel('Amplitude');
title('Task2');
legend('Magnitude')
subplot(2,2,3);
plot(w/pi,angX, 'b');
grid on;
xlabel('Time');
ylabel('Amplitude');
title('Task2');
legend('Angle ')
subplot(2,2,2);
plot(w/pi,realX, 'k');
grid on;
xlabel('Time');
ylabel('Amplitude');
title('Task2');
legend(' Real parts')
subplot(2,2,4);
plot(w/pi,imagX, 'g');
grid on;
xlabel('Time');
ylabel('Amplitude');
title('Task2');
legend('Imaginary parts')
Result:
0 Comments