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

forir (file name)

function r=forir(x)
%x=[ 1 2 3 4 5 6 7 ];
n=-2:4;
m=500;
k=0:m;
n1=transpose(n);
p=n1*k
a=(pi/m).*p
y=-j.*a;
w=(pi/m)*k
r=x*exp(y)

stem(w/pi,real(r))
title('asif')

frequency (file name)

w=0:pi/100:pi
a=0.5
a=a*ones(1,length(w))
x=exp(j.*w)./(exp(j.*w)-0.5)

plot(w,real(x))
figure
plot(w,imag(x))
figure
plot(w,abs(x))
figure
plot(w,angle(x))

liner (file name)

a=9;
b=8;
x=[ 1 2 3 4 5 6 7]
z=a.*x
y=[ 1 4 5 6 7 8 9]
t=b.*y
%subplot(3,1,1)
%forir(z)
%subplot(3,1,2)
%forir(t)
%subplot(3,1,3)
forir(z+t)
figure
k=0:m;
w=(pi/m)*k
plot(w,forir(z)+forir(t))

task3 (file name)


%let b(n) be a complex valued random sequence
%defined over -10<=n<=10 than verify the conjugation property of dtft

n=-10:10
z=length(n)
b=rand(1,21)+j*rand(1,21)
b1=conj(b)
m=500;
k=0:m;
w=(pi/m)*k
stem(w,forir2(b1,n))
figure
t=fliplr(forir2(b,n))
w=fliplr(w)
stem(w,conj(t))

task4(file name)

n=-10:10
z=length(n)
b=rand(1,21)+j*rand(1,21)
x=fliplr(b)
n1=fliplr(n)
m=500;
k=0:m;
w=(pi/m)*k
stem(w,forir2(x,n1))
figure
w=fliplr(w)
stem(w,fliplr(forir2(b,n)))

You might also like