Labno8: Fourier Transform &inverse Fourier Transform
Labno8: Fourier Transform &inverse Fourier Transform
OBJECTIVE
The sym function can be used to create 'symbolic objects' in MATLAB. For example,
typing >>x=sym('x') creates the symbolic variable with name x.
The syms function enables you to combine more than one such statement into a single
statement. For example, typing syms x is equivalent to typing x=sym('x'), and typing syms x y
u v creates the four variables x, y, u and v.
You can use sym function to create symbolic constants by single numerical value for the
argument. For example, typing pi=sym('pi'), fraction=sym('1/3')and sqroot2=sym('sqrt(2)')
create symbolic constants that avoid the floating point approximations inherent in the values
of pi, 1/3 and sqrt(2). If you create a symbolic constant pi this way, it temporarily replaces the
built-in numeric constant, and you no longer obtain a numeric value when you type its name.
The advantage of using symbolic constants is that they need not be evaluated (with
the accompanying round-off error) until a numeric answer is required.
int(S)
int(S,
a,b)
int(S) returns the indefinite integral of S with respect to its symbolic variable.
int(S,a,b) returns the definite integral from a to b of each element of S with respect to
each element's default symbolic variable a and b are symbolic or double scalars.
Write following code in MATLAB and write your results in space provided
>>syms x t n
>>int(x)
>>int(cos(x))
>>int(sin(x))
>>int(exp(-2*t))
>>int(exp(-2*j*t))
>>int(t*exp(-t))
>>int(cos(x),0,2*pi)
>>int(sin(x),0,2*pi)
>>int(exp(-t/2)*cos(n*t),0,pi)
>> a0=int(exp(-t/2),0,pi
syms t
fourier(cos(t))
Example 1:
Example 2:
INVERSE FOURIER TRANSFORM
If you have obtained the frequency domain expression , then you can find the corresponding
time domain expression by finding its inverse Fourier transform. In MATLAB, this is
obtained by the function. The inverse Fourier transform of the scalar symbolic object F with
default independent variable ω. The default return is a function of x. The inverse Fourier
transform is applied to a function of ω and returns a function of takes F to be a function of v
and f to be a function of u instead of the default ω and , respectively.
Q.1 Parseval’s relation states that the energy of a signal can be computed by integrating the
squared magnitude of the signal either over the time domain or frequency domain. If x(t) and