clc;
close all;
clear all;
x= input('Enter the Sequence:');
[S,N]= size(x);
w=exp(-i*2*pi/N);
for r= 0:2
for n=1:N-1
x(r*N+n)=x(n)
T(r*N+n)=r*N+n
end
end
subplot(3,1,1);
stem(T,x)
xlabel('Time');
ylabel('Amplitude');
title('Given Signal');
for k=1:3*n
x(k)= 0
for n=1:N-1
x(k)= x(k) +x(n)*w^[(k-1)*(n-1)];
end
end
subplot(3,1,2);
stem(T,abs(x));
xlabel('k');
ylabel('x(k)');
title('Discrete Fourier Series Magnitude Plot:');
subplot(3,1,3);
stem(T,angle(x));
xlabel('k');
ylabel('x(k)');
title('Discrete Fourier Series Phase Plot:');
Input:
Enter the Sequence:[1 2 3 3]
Output:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment