Notes
Notes - notes.io |
clc
clear all
N=64;
x=randi(10,N,1)+i.*randi(10,N,1);
tic
W_N=exp(-2*1j*pi/N);
for i=1:N
for j=1:N
V_N(i,j)=W_N.^((i-1)*(j-1));
end
end
disp('The twiddle factor matrix')
V_N
x= V_N*x;
time(2)=toc;
V_real=real(V_N);
V_imaginary=imag(V_N);
subplot(2,2,1)
imshow(V_real);
title('Real parts of twiddle factor matrix as image')
subplot(2,1,2)
imshow(V_imaginary);
title('Imaginary parts of twiddle factor matrix as image')
tic
X_direct2=fft(x,N);
time_fft(2)=toc;
Exp 3
clc;
clear all;
close all;
x1=[1 1 1];
x2=[1 3 4 7];
N1=size(x1,2);
N2=size(x2,2);
N=max(N1,N2);
disp('Circular Convolution of result')
c=cconv(x1,x2,N)
N=5000;
x1=randi(10,N,1)+1i.*randi(10,N,1);
x2=randi(10,N,1)+1i.*randi(10,N,1);
x2c = conj(x2);
disp('Left hand side of Parsevels Theorem')
lhs=sum(x1.*x2c);
X1=fft(x1);
X2=fft(x2);
X2c=conj(X2);
disp('Right hand side of Parsevels Theorem')
rhs=(1/N).*sum(X1.*X2c);
exp 4
clc;
clear all;
close all;
x1=input('Enter the first sequence x1(n) = ');
x2=input('Enter the second sequence x2(n) = ');
L=length(x1);
M=length(x2);
N=L+M-1;
yn=conv(x1,x2);
disp('The values of yn are= ');
disp(yn);
n1=0:L-1;
subplot(3,1,1);
stem(n1,x1);
grid on;
xlabel('n1');
ylabel('amplitude');
title('First sequence');
n2=0:M-1;
subplot(3,1,2);
stem(n2,x2);
grid on;
xlabel('n2');
ylabel('Amplitude');
title('Second sequence');
n3=0:N-1;
subplot(3,1,3);
stem(n3,yn);
grid on;
xlabel('n3');
ylabel('Amplitude');
title('Convolved output');
exp 5
clc;
clear all;
close all;
x= input('Enter the sequence : ')
N=length(x)
xK=fft(x,N)
xn=ifft(xK)
n=0:N-1;
subplot (2,2,1);
stem(n,x);
xlabel('n ');
ylabel('amplitude');
title('input sequence');
subplot (2,2,2);
stem(n,abs(xK));
xlabel('n ');
ylabel('magnitude');
title('magnitude response');
subplot (2,2,3);
stem(n,angle(xK));
xlabel('n');
ylabel('phase');
title('Phase responce');
subplot (2,2,4);
stem(n,xn);
xlabel('n ');
ylabel('amplitude');
title('IFFT');
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team