Professional Documents
Culture Documents
fs1=1.2*fy;
t2=0:1/fs1:5;
y2=sin(wy*t2);
subplot(3,3,4);
stem(t2,y2);
hold on;
plot(t2,y2);
grid on;
xlabel('time');
ylabel('amplitude');
title('UNDER SAMPLED SIGNAL');
hold on;
y4f=fft(y2);
l2=0:length(y4f)-1;
subplot(3,3,7);
plot(l2,y4f);
hold on;
xlabel('freq');
ylabel('magnitude');
title('SPECTRUM OF UNDER SAMPLED SIGNAL');
fs2=2*fy;
t3=0:1/(fs2*fs2):5;
y3=sin(wy*t3);
subplot(3,3,5);
stem(t3,y3);
hold on;
plot(t3,y3);
grid on;
xlabel('time');
ylabel('amplitude');
title('RIGHTLY SAMPLED SIGNAL');
hold on;
y3f=fft(y3);
l3=0:length(y3f)-1;
subplot(3,3,8);
plot(l3,y3f);
hold on;
xlabel('freq');
ylabel('magnitude');
title('SPECTRUM OF RIGHTLY SAMPLED SIGNAL');
fs3=7*fy;
t4=0:1/(fs3*fs3):5;
y4=sin(wy*t4);
subplot(3,3,6);
stem(t4,y4);
hold on;
plot(t4,y4);
grid on;
xlabel('time');
ylabel('amplitude');
title('OVER SAMPLED SIGNAL');
hold on;
y4f=fft(y4);
l4=0:length(y4f)-1;
subplot(3,3,9);
plot(l4,y4f);
hold on;
xlabel('freq');
ylabel('magnitude');
title('SPECTRUM OF OVER SAMPLED SIGNAL');
INPUT:
INPUT:
OUTPUT: