Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

1.

syms t;
fs=2;
fun=matlabFunction(exp(-2*pi*t*fs));
F=matlabFunction(int(exp(-2*pi*t*fs)));

x=linspace(-10,10,100);
y=fun(x);
z=F(x);

subplot(2,1,1)
plot(x,y)
title('Original function-2012157’)

subplot(2,1,2)
plot(x,z)
title('Integral of the function-2012157')
1.b

syms t;
fs=2;
fun=matlabFunction(exp(-2*i*pi*t*fs));
F=matlabFunction(int(exp(-2*i*pi*t*fs)));

x=linspace(-10,10,100);
y=fun(x);
z=F(x);

subplot(2,1,1)
plot(x,y)
title('Original function-2012157')

subplot(2,1,2)
plot(x,z)
title('Integral of the function-2012157’)
2.b

t=-5:0.01:5
fs=2

real=cos(2*pi*fs*t).*cos(2*t)
imaginary=cos(2*pi*fs*t).*sin(-2*t)

subplot(2,1,1)
plot(t,real)
grid on
title('Real part of cos(2*pi*f*t)*e^(-2it)__2012157')

subplot(2,1,2)
plot(t,imaginary)
grid on
title('Imaginary part of cos(2*pi*f*t)*e^(-2it)__2012157’)
2.a

t=-5:0.01:5
fs=2

real=sin(2*pi*fs*t)
imaginary=[zeros(1,500) 0 zeros(1,500)]

subplot(2,1,1)
plot(t,real)
grid on
title('Real part of sin(2*pi*f*t)__2012157')

subplot(2,1,2)
plot(t,imaginary)
grid on
title('Imaginary part of sin(2*pi*f*t)__2012157’)

You might also like