Showing posts with label Fourier transform. Show all posts
Showing posts with label Fourier transform. Show all posts

MATLAB program to find the Fourier transform of an exponential curve

Progam code
clc;
clear all;
close all;
t=0:0.001:1;
a=input('Please enter the multiplication factor of an exponential curve ');
cwtstruct = cwtft(exp(a*t),'plot');

Example of output
Please enter the multiplication factor of an exponential curve  5


_____________________________

MATLAB program to find the Fourier Transform of cosine wave

Program code

clc;
clear all;
close all;
t=0:0.001:1;
cwtstruct = cwtft((cos(2*3.14*1000*t)),'plot');


Output

______________________________________

MATLAB program to find out the Fourier Transform of sinusoidal waveform

Program code
clc;
clear all;
close all;
t=0:0.001:1;
cwtstruct = cwtft((sin(2*3.14*1000*t)),'plot');


Output


________________________

MATLAB program to find DFT and IDFT using matlab functions

Program Code
%DFT and IDFT using matlab functions
clc;
close all;
clear all;
x=input('Please enter the sequence x(n)=');
N=input('Please enter the length of the DFT N=');
X=fft(x,N);
n=0:length(x)-1;
subplot(311);
stem(n,x);
title('Input Sequence');
subplot(323);
n=0:length(X)-1;
stem(n,X);
disp('DFT of input sequence is ');
disp(X);
title('DFT');
subplot(324);
stem(n,abs(X));
title('Magnitude spectrum');
subplot(325);
stem(n,angle(X));
title('Phase spectrum');
xr=ifft(x,N);
subplot(326);
stem(n,abs(xr));
title('IDFT');
disp('IDFT of input sequence is ');
disp(xr);
Example of Output
Please enter the sequence x(n)=[1 2 3 4 5 6 7 8 9]
Please enter the length of the DFT N=6
DFT of input sequence is 
  Columns 1 through 4

  21.0000 + 0.0000i      -3.0000 + 5.1962i       -3.0000 + 1.7321i       -3.0000 + 0.0000i

  Columns 5 through 6

  -3.0000 - 1.7321i          -3.0000 - 5.1962i

IDFT of input sequence is 
  Columns 1 through 4

   3.5000 + 0.0000i       -0.5000 - 0.8660i         -0.5000 - 0.2887i       -0.5000 + 0.0000i

  Columns 5 through 6

  -0.5000 + 0.2887i         -0.5000 + 0.8660i
______________________________

For sale

For sale
Indian currency Ten-rupee note in good condition. Issued by the Reserve Bank of India between 22 December 1992 and 21 December 1997. Serial number 52T332603 . Those interested to buy, please contact: Anju K, Email: tc9749@gmail.com . Address: 'Sreyas', House no.7/296, Pulliodi, Kathiroor village, Ponniam east PO, via Ponniam west, Thalassery, Kannur, Kerala - 670641, India.