0% found this document useful (0 votes)
77 views

Experiment 1: AIM: To Determine Fourier Series of A Periodic Signal Using MATLAB. Requirements: Matlab Lab Tasks

The document describes two experiments involving Fourier analysis using MATLAB. Experiment 1 aims to determine the Fourier series coefficients of the periodic signal cos(t) from 0 to 2π. It presents the MATLAB code that calculates the coefficients as an integral expression and outputs the result as [0 1/2 0 1/2 0]. Experiment 2 aims to program the discrete time Fourier transform (DTFT). It presents the DTFT formula and MATLAB script that takes a user-input discrete signal, calculates the DTFT using an iteration formula, and outputs the result for the example input signal [1 2 3 4].

Uploaded by

RUTUJA MADHURE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Experiment 1: AIM: To Determine Fourier Series of A Periodic Signal Using MATLAB. Requirements: Matlab Lab Tasks

The document describes two experiments involving Fourier analysis using MATLAB. Experiment 1 aims to determine the Fourier series coefficients of the periodic signal cos(t) from 0 to 2π. It presents the MATLAB code that calculates the coefficients as an integral expression and outputs the result as [0 1/2 0 1/2 0]. Experiment 2 aims to program the discrete time Fourier transform (DTFT). It presents the DTFT formula and MATLAB script that takes a user-input discrete signal, calculates the DTFT using an iteration formula, and outputs the result for the example input signal [1 2 3 4].

Uploaded by

RUTUJA MADHURE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPERIMENT 1

AIM: To determine fourier series of a periodic signal using MATLAB.

REQUIREMENTS: MATLAB
LAB TASKS:
1.)x=cos(t), 0<=t<=2*pi is input sequence. Determine the fourier series of x..

PROGRAM:
clc;
clear all;
close all;
syms t;
for k=-2:2
int(cos(t)*exp(-1i*k*t),t,0,2*pi)/(2*pi)
end

PERFORM:
1. We have taken sinusoidal signal cos(t).
2. Then we have determined it’s fourier series coefficient from -2 to 2 using
The expression,
int(cos(t)*exp(-1i*k*t),t,0,2*pi)/(2*pi)

RESULT:
[0 1/2 0 1/2 0], is the required fourier series coefficients.

CONCLUSION:
Thus, we successfully computed fourier series coefficients of a given signal cos(t)
EXPERIMENT 2
AIM:
Program for determination of discrete time fourier transform.

REQUIREMENTS:MATLAB

THEORY:
Fourier series links a continuous time signal into the discrete-frequency domain.
The periodicity of the time-domain signal forces the spectrum to be discrete.
The discrete Fourier transform of a discrete-time signal g[n] is given
as,

LAB TASK: (Script file)


xn=input(‘enter the sequence x(n)’);
[N]=length(xn);
xn=xn.’;
n=0:N-1;
for k=0:N-1
xm(k+1)=exp(-j*2*pi*k*n/N)*xn;
end
disp(‘x(k)=’)
disp(xm)

PERFORM:
1. We have taken discrete signal from the user.
2. Then we have determined it’s discrete time fourier transform by using
the formula and iteration,
xm(k+1)=exp(-j*2*pi*k*n/N)*xn;

RESULT:
for a given signal xn=[1 2 3 4]
DTFT is given by[10+0i -2+2i -2-2i -2+0i]

CONCLUSION:
Thus, we successfully computed DTFT of any arbitrary discrete signal.

You might also like