목차
1. matlab pulstran함수를 이용하여 다음 주기함수를 그리시오.
2. 위함수를 Fourier Series를 도시하라..
3.다음 함수를 -10<= t =<10구간에서 plot 하시오
(a) f(t)=e-[t]
(b)-10<= t =<10구간에서 Fourier 변환을 통하여(FFT)를 이용하여 amplitude와
phase spectrum을 그리시오
2. 위함수를 Fourier Series를 도시하라..
3.다음 함수를 -10<= t =<10구간에서 plot 하시오
(a) f(t)=e-[t]
(b)-10<= t =<10구간에서 Fourier 변환을 통하여(FFT)를 이용하여 amplitude와
phase spectrum을 그리시오
본문내용
bel(\'t\');
end
(a)
close all;
clear all;
clc;
%data1
t=-2:0.01:2;
y=rectpuls(t,1/4);
subplot(221);
plot(t-0.125,y,\'b\',\'linewidth\',2);
grid on;
axis([-2 2 -1 2]);
ylabel(\'X(t)\')
xlabel(\'t\');
title(\'\\Pi (t)\')
%data2
t2 = -2: 0.01 : 3;
D = -1/8-4 : 1 : 4;
Y = pulstran(t2,D,\'rectpuls\',1/4);
subplot(222);
plot(t2,Y,\'r\',\'linewidth\',2);
grid on;
axis([-2 3 -1 2]);
ylabel(\'X(t)\');xlabel(\'t\');
title(\'Pulse Train\');
echo on
fnct=\'rectpuls1\';
a=-0.5; b=0.5; n=24;tol=[];
xx=fseries(fnct,a,b,n,tol,1/4);
xx1=xx(n+1:-1:2);
xx1=[conj(xx1),xx];
absxx1=abs(xx1);
n1=[-n:n];
subplot(223);
stem(n1,absxx1);
grid on;
title(‘The Discrete Magnitude Spectrum\');
phasexx1=angle(xx1);
subplot(224);
stem(n1,phasexx1);
grid on;
title(\'The Discrete Phase Spectrum\');
end
(b)
close all;
clear all;
clc;
%data1
t=-2:0.01:2;
y=tripuls3(t,1);
subplot(221);
plot(t,y,\'b\',\'linewidth\',2);
grid on;
ylabel(\'X(t)\');
xlabel(\'t\');
title(\'\\Pi (t)\');
axis([-2 2 -2 2]);
%data2
t2=-2:0.01:3;
D=[-2:1: 3];
y2=-pulstran(t2, D, \'tripuls\',1)+1;
subplot(222);
plot(t2,2*y2-1,\'r\',\'linewidth\',2);
grid on;
ylabel(\'X(t)\');
xlabel(\'t\');
title(\'Pulse Train\');
axis([-2 3 -2 2]);
echo on
fnct=\'tripuls3\';
a=-0.5;
b=0.5;
n=24;
tol=[];
xx=fseries(fnct,a,b,n,tol,1);
xx1=xx(n+1:-1:2);
xx1=[conj(xx1),xx];
absxx1=abs(xx1);
n1=[-n:n];
subplot(223);
stem(n1,absxx1);
grid on;
title(\'The Discrete Magnitude Spectrum\');
phasexx1=angle(xx1);
subplot(224);
stem(n1,phasexx1);
grid on;
title(\'The Discrete Phase Spectrum\');
end
(a) rectpuls1
(b)tripuls3
end
(a)
close all;
clear all;
clc;
%data1
t=-2:0.01:2;
y=rectpuls(t,1/4);
subplot(221);
plot(t-0.125,y,\'b\',\'linewidth\',2);
grid on;
axis([-2 2 -1 2]);
ylabel(\'X(t)\')
xlabel(\'t\');
title(\'\\Pi (t)\')
%data2
t2 = -2: 0.01 : 3;
D = -1/8-4 : 1 : 4;
Y = pulstran(t2,D,\'rectpuls\',1/4);
subplot(222);
plot(t2,Y,\'r\',\'linewidth\',2);
grid on;
axis([-2 3 -1 2]);
ylabel(\'X(t)\');xlabel(\'t\');
title(\'Pulse Train\');
echo on
fnct=\'rectpuls1\';
a=-0.5; b=0.5; n=24;tol=[];
xx=fseries(fnct,a,b,n,tol,1/4);
xx1=xx(n+1:-1:2);
xx1=[conj(xx1),xx];
absxx1=abs(xx1);
n1=[-n:n];
subplot(223);
stem(n1,absxx1);
grid on;
title(‘The Discrete Magnitude Spectrum\');
phasexx1=angle(xx1);
subplot(224);
stem(n1,phasexx1);
grid on;
title(\'The Discrete Phase Spectrum\');
end
(b)
close all;
clear all;
clc;
%data1
t=-2:0.01:2;
y=tripuls3(t,1);
subplot(221);
plot(t,y,\'b\',\'linewidth\',2);
grid on;
ylabel(\'X(t)\');
xlabel(\'t\');
title(\'\\Pi (t)\');
axis([-2 2 -2 2]);
%data2
t2=-2:0.01:3;
D=[-2:1: 3];
y2=-pulstran(t2, D, \'tripuls\',1)+1;
subplot(222);
plot(t2,2*y2-1,\'r\',\'linewidth\',2);
grid on;
ylabel(\'X(t)\');
xlabel(\'t\');
title(\'Pulse Train\');
axis([-2 3 -2 2]);
echo on
fnct=\'tripuls3\';
a=-0.5;
b=0.5;
n=24;
tol=[];
xx=fseries(fnct,a,b,n,tol,1);
xx1=xx(n+1:-1:2);
xx1=[conj(xx1),xx];
absxx1=abs(xx1);
n1=[-n:n];
subplot(223);
stem(n1,absxx1);
grid on;
title(\'The Discrete Magnitude Spectrum\');
phasexx1=angle(xx1);
subplot(224);
stem(n1,phasexx1);
grid on;
title(\'The Discrete Phase Spectrum\');
end
(a) rectpuls1
(b)tripuls3
소개글