l217_formal_report fourier representation of signals and filtering
TRANSCRIPT
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
1/22
iv
TTAABBLLEE OOFF CCOONNTTEENNTTSS
Page
Abstract .. i
Acknowledgements .. iiiTable of Contents iv
List of Illustration v
Glossary of Key Terms .. vi
1. Introduction 1
1.1 Purpose . 1
1.2 Scope 1
1.3 Objective .. 2
2. Theorical Background 3
2.1 Continuous Time Signals and its Fourier Transforms . 3
2.2 FFiillttee rr.. 3
2.3 MATLAB .. 4
3. Procedure, Findings and Discussions 5
3.1 Preparation to run MATLAB . 5
3.2 FFoouurriieerr TTrraa nnss ffoorrmm oo ffCCoo nntt iinnuuoo uuss--TTiimmee SS iiggnnaa llss 55
33..22..11 FFoouurriieerr TTrraa nnss ffoorrmm aa nndd ssppeecc ttrruummpp lloott oo ffss iinnee aa nndd ccooss iinnee .... 55
33..22..22 DD iisscc uussss iioo nn oonn FF iinndd iinnggss .... 66
33..33 FFoouurriieerr TTrraa nnss ffoorrmm oo ffRReeccttaa nngguullaarrPP uullsseess aa nndd tthhee iirrpp lloo ttss .... 77
33..33..11 PPlloo tt oo ffRReeccttaa nngguullaarrPP uullsseess aa nndd iitt ss SSppeecc ttrruummss .. 77
33..33..22 DD iisscc uussss iioo nn oonn FF iinndd iinnggss .... 88
33..44 FFiillttee rriinngg oo ffRReeaa ll-- LLiiffee SS iiggnnaa llss .. 99
33..44..11 FFiillttee rriinngg oo ffSSppee eecc hh .. 1100
33..44..22 DD iisscc uussss iioo nn oonn FF iinndd iinnggss .... 1100
33..44..33 FFiillttee rriinngg oo ffIImmaa ggee .... 1122
33..44..44 DD iisscc uussss iioo nn oonn FF iinndd iinnggss .. 1133
44.. CCoonncclluuss iioonn 1144
References
Appendix
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
2/22
v
LLIISSTT OOFF IILLLLUUSSTTRRAATTIIOONNSS
Page
Figure 1.1 MATLAB software used in experiment .. 1
Figure 2.1 A Continuous time signal .. 3Figure 2.2 Spectrum of a signal 4
Figure 3.1 Plot of sin(t) in time domain . 6
Figure 3.2 Plot of sin spectrum .. 6
Figure 3.3 Plot of Cos(t) in time domain 7
Figure 3.4 Plot of Cos spectrum . 7
FFiigguurree 33..55 PP lloo tt oo ffrreecc ttaa nngguullaarrppuullssee 99
Figure 3.6 Rectangular Pulses with Difference Pulse Width . 9
FFiigguurree 33..77 SSppeecctt rruumm oo ffRReecc ttaa nngguullaarrPP uullss eess 99
FFiigguurree 33..88 SSppeecctt rruumm oo ffssppeeeecc hh ss iiggnnaa ll 1111
FFiigguurree 33..99 SSppeecctt rruumm oo ff ffiillttee rreedd ssppeeeecc hh ss iiggnnaa ll ww iitthh LLPPFF 1111
FFiigguurree 33..1100 OOrriiggiinnaa ll SSppeeeecc hh SS iiggnnaa ll aa nndd FF iilltteerreedd SS iiggnnaa ll .. 1111
FFiigguurree 33..1111 OOrriiggiinnaa ll PP iiccttuurree 1122
FFiigguurree 33..1122 PP iicc ttuurree OO uuttpp uutt ww iitthh LLooww PPaa ssss FF iillttee rr 1133
FFiigguurree 33..1133 PP iicc ttuurree OO uuttpp uutt ww iitthh HH iigghh PPaass ss FF iilltteerr...... 1133
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
3/22
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
4/22
vii
infinitely short in time while maintaining its area or integral (thus giving an infinitely highpeak). While this is impossible in any real system, it is a useful concept as an idealization.
Inverse Fourier Transform Refer to inverse process of the Fourier Transform and
thus recovers a function from its Fourier transform back to time domain.
Low-Pass Filter(LPF) A low-pass filteris a filterthat passes low frequencies
well, but attenuates (or reduces) frequencies higher than the cut-off frequency. The actualamount of attenuation for each frequency varies from filter to filter. It is sometimes called a
high-cut filter, ortreble cut filter when used in audio applications.
MATLAB A numerical computing environment and programming language created by
The MathWorks , MATLAB allows easy matrix manipulation, plotting of functions and data,implementation of algorithms, creation ofuser interfaces, and interfacing with programs in
other languages. Although it specializes in numerical computing, an optional toolboxinterfaces with the Maple symbolic engine, making it a full computer algebra system.
Spectrums A graphic or photographic representation ofthe range of values of a quantityor set of related quantities distributed in various frequencies.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
5/22
EE2072: Laboratory 2B School of Electrical andLaboratory Experiment Report (L226) Electronic Engineering
_____________________________________________________________________
Page 1 of14
11.. IINNTTRROODDUUCCTTIIOONN
11..11 PPuurrppooss ee
This report documents the laboratory experiment on Fourier representation of signals and
filtering. Fourier representation of signals is important in signal analysis. MATLAB providegreat computing tools for such analysis.
FFiigguurree 11..11 MM AATTLLAABB ssooffttwwaarree uuss ee dd iinn ee xxppee rriimmee nntt
11..22 SSccooppee
Signals and Systems are important in electronics engineering, especially in communicationfield. Signal analysis is one of the most important parts of communication system design.
There are a lot of methods to perform the signal analysis like Fourier Transform Analysis,Laplace Transform Analysis or Z Transform. However, this experiment only emphasizes on
Fourier Transform Analysis on signals and Fourier representations of signals are mainlyfocus.
Filters, another major topic in electronics engineering, also play an important role. Filters canbe classified in different point of view such as: Low Pass Filter, High Pass Filter, Band Pass
Filter, Band Stop Filter, Passive Filter, Active Filter or even the Digital Filters which mayused microprocessor to achieve the filtering job. This experiment, as an undergraduate level,will only discussed about Low Pass Filter and High Pass Filter, the two very fundamental
filters in signals and system analysis and design.
On the other hand, MATHLAB provide powerful tools for signals and systems analysis anddesign. It is not possible to cover all the MATHLAB functions in this experiment. Only the
basic command will be used in this experiment and advanced MATLAB functions like
Simulink are not cover in this experiment.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
6/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 2 of14
11..33 OObbjjee cctt iivvee
The main objectives of this experiment are:
v To learn the MATLAB environment to perform basic signals analysis.
v To learn the Fourier transform of signals using MATLAB environment.v To learn the plotting of spectrums of different type of signals.v To learn the filtering applications of signals using sound and picture as an example.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
7/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 3 of14
22.. TTHHEEOORRIICCAALL BBAACCKKGGRROOUUNNDD
22..11 CCoonnttiinnuuoouuss TTiimmee SSiiggnnaallss aanndd iittss FFoouurriiee rr TTrraannss ffoorrmmss
A continuous signal or a continuous-time signal is a varying quantity that is expressed as a
function of a real-valued domain, usually time. The function of time need not be continuous.The signal is defined over a domain, which may or may not be finite, and there is a functional
mapping from the domain to the value of the signal. The continuity of the time variable, inconnection with the law of density of real numbers, means that the signal value can be foundat any arbitrary location, t0.
FFiigguurree 22..11 AA CCoonnttiinnuuoouuss ttiimmee ss iiggnnaall
The continuous time signals can be represented in frequency domain using the continues -time Fourier transform (CTFT). Spectrum, the Fourier transform of signals, denoted by F(j)is defined as:
+
-
-= dtetfjF tjww )()( (1)
22..22 FFii llttee rr
Filter (Electronic filter) is electronic circuit which perform signal processing
Functions, specifically intended to remove unwanted signal components and/or enhancewanted ones. Electronic filters or audio filters can be: passive oractive, analog ordigital,discrete-time (sampled) or continuous-time, linearornon- linear, infinite impulse response
(IIR type) or finite impulse response (FIR type).
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
8/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 4 of14
Therefore, a filter passes some of the signals frequencies and stops others frequenciesleading the output signal does not have all the frequencies of the input signal. Spectrums are
plotted to analyze which frequency components are being filtered and which are present in
output.
FFiigguurree 22..22 SSppee cctt rruumm ooffaa ss iiggnnaall
22..33 MM AATTLLAABB
The name MATLAB stands for matrix laboratory. MATLAB is a high-performancelanguage for technical computing. It integrates computation, visualization, and programming
in an easy-to-use environment where problems and solutions are expressed in familiarmathematical notation. Created by The MathWorks , MATLAB allows easy matrix
manipulation, plotting offunctions and data, implementation of algorithms, creation ofuserinterfaces, and interfacing with programs in other languages. Although it specializes innumerical computing, an optional toolbox interfaces with the Maple symbolic engine,
making it a full computer algebra system.
The details of the theorical background are not discussed there in order not to overload thereport. The reference list at the end of the report should be referred when more detailed arerequired.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
9/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 5 of14
33.. PPRROOCCEEDDUURREE,, FFIINNDDIINNGGSS AANNDD DDIISSCCUUSSSSIIOONNSS
33..11 PPrree ppaarraatt iioonn ttoo rruunn MM AATTLLAABB
The school laboratory had pre written the MATLAB function, diracplot.m, to plot the Fourier
transform Spectrum of the signals. speech_dft.wav and flowers.tif files were provided forfilter analysis. These three files were copy to MATLAB working directoryC:\MATLAB6p5\work.
33..22 FFoouurriiee rr TTrraannss ffoorrmm ooff CCoonntt iinnuuoouuss -- TTiimmee SSiiggnnaallss
A periodic signal xCosxSinf 3223 -= is defined as symbolic function and plotted the time
domain signal using MATLAB ezplot command. Fourier transformed of f is found by
fourier command and inverse Fourier transform of F was found using ifourier
command, taking note that the result of inverse Fourier transform of F was the originalxCosxSinf 3223 -= . The detailed procedure is listed in Listing 3.1.
Plot of f and spectrum of F were shown in figure 2.1 and figure 2.2 respectively.
Listing 3.1
1 x=sym('t');2 f = sym(3*sin(2*x)-2*cos(3*x));3 figure (1)
4 ezplot(f)5 ezplot(f,0,20)6 F=fourier(f)7 f2=ifourier(F);8 figure(2)
9 diracplot(F)
33..22..11 FFoouurriiee rr TTrraannss ffoorrmm aanndd ss ppee ccttrruumm pplloo tt ooffss iinnee aanndd ccooss iinnee
The Fourier transforms of sine and cosine functions were calculated and their spectrums were
plotted for better understanding of MATLAB, signal analysis and spectrum.
The negative frequencies were observed (figure 3.2) and note that this was because of
mathematical equation: xSine =)(J and xSine -=- )( J . In real world, there will not be such
negative frequency and taking note that the Y-axis refer to the magnitude and thus, only have
the positive value is presented.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
10/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 6 of14
FFiigguurree 33..11 PPlloott ooffSS iinn((tt )) iinn tt iimmee ddoo mmaa iinn
FFiigguurree 33..22 PPl
loott ooffSS i
inn ssppee ccttrruumm
33..22..22 DD iiss ccuuss ss iioonn oonn FFiinnddiinnggss
The continuous time signal, xtSine =)( for example, is the function oftime (t). So, when the
function was plotted, the X-axis (the horizontal axis) refers to input to the function, t in thiscase, and the Y-axis (the vertical axis) refers to the value of function at respective inputvalue.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
11/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 7 of14
FFiigguurree 33..33 PPlloott ooff CCooss ((tt)) iinn ttiimmee ddoo mmaaiinn FFiigguurree 33..44 PPlloott oo ffCCooss ss ppee ccttrruumm
When the spectrum is plotted, the X-axis refers to frequency, the domain of the function, andthe Y-axis refer to magnitude of spectrum, the range of the function.
The spectrum plot of Sine and Cosine Signals are the same because of both signals havingsame frequency and amplitude.
Period, loosely speaking, is the time taken to complete one cycle of signal before it repeats.
In figure 2.1, the period of the signal is about 6 second and it is related to sinusoid
components by mean of the one complete cycle.
33..33 FFoouurriiee rr TTrraannss ffoorrmm ooffRRee ccttaanngguullaarr PPuullss ee ss aanndd tt hhee iirr pplloottss
33..33..11 PPlloo tt ooffRRee ccttaanngguullaarr PPuullss eess aanndd ii ttss SSppee cctt rruummss
In Mathematics, the unit rectangular function )(T
trect is defined as:
1)( =T
trect for all 2|| Tt and 0)( =T
t
rect otherwise. Therefore T refer to the width of
the rectangular pulse. rectpuls defined in MATLAB is not a symbolic function because
there is no variable t orx and therefore, the MATLAB function fourier, which argumentneeds to be a symbolic function, could not be used to calculate the Fourier transforms of the
rectangular function.
To plot the spectrum of the rectangular function, the Fourier transform integral was
calculated by the basic definition and their spectrums are plotted. Listing 3.2 lists the detailedprocedure.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
12/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 8 of14
Listing 3.2
1 tarray= -10:0.1:10;
2 T=2;
3 figure(3)
4 plot(tarray,rectpuls(tarray,T))5 hold
6 tarray=-10:0.01:10;7 plot(tarray,rectpuls(tarray,T))8 x=sym('t');9 w=sym('w');
10 P=int(exp(-j*w*x),x,-T/2,T/2);11 figure(4)
12 T=2;
13 plot(tarray,rectpuls(tarray,T), 'b')14 hold
15 T=5;
16 plot(tarray,rectpuls(tarray,T),'r')17 T=2;
18 P=int(exp(-j*w*x),x,-T/2,T/2);19 figure(1)
20 ezplot(P)21 T=5;
22 P=int(exp(-j*w*x),x,-T/2,T/2);23 hold
24 ezplot(P)
33..33..22 DD iiss ccuuss ss iioonn oonn FFiinnddiinnggss
MATLAB int function was used to perform the integration to get the Fourier transform of
the rectangular pulse. The result is same as equation 8c in lab manual.
Before plotting the spectrum of the signal, the rectangular pulse was plotted with differencestep size. From the figure 3.5, it is clearly seen that the step size plays an important role in
highly precise systems. The blue pulse was plotted with step size of 0.1 and finer plot wasobtained with step size of 0.01.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
13/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 9 of14
FFiigguurree 33..55 PPlloott ooff rree ccttaanngguullaarr ppuullss ee FFiigguurree 33..66 RRee ccttaanngguullaarr PPuullss eewwii tthh DD ii ffffee rree nnccee PPuullss ee WWiiddtt hh
In order to analysis the spectrum of rectangular pulse, two different rectangular pulses weredefined and their spectrum was plotted.
FFiigguurree 33..77 SSppee cctt rruummss ooffRRee ccttaanngguullaarr PPuullss ee ss
It is clearly that when the rectangular pulse is decreased (from red to blue in figure 3.6), thewidth of the frequency spectrum is increased (from red to blue in figure 3.7).
33..44 FFii llttee rriinngg ooffRRee aall--LLii ffee SSiiggnnaa llss
Filters, as introduced in section 2.2, can be obtained in MATLAB with fir1 function. In
this experiment, a low pass filter with cut-off frequency 0.4 was used to demonstrate theaffect of using filter on real- life signals.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
14/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 10 of14
33..44..11 FFii llttee rriinngg ooffSSppee ee cchh
A speech file,speech_dft.wav , was used as input to the filter and output speech signal was
examined. Input spectrum and output spectrum were plotted on different figure as well as inthe same figure. Listing 3.3 lists the detailed procedure on MATLAB.
Listing 3.3
1 input = wavread('speech_dft.wav');2 myfilter = fir1(20,0.4,'low');3 output = filter(myfilter,1,input);4 sound(input,22050)5 sound(output,22050)6 X1=fft(input);
7 X2=fftshift(X1);8 X3=abs(X2);9 figure(5)
10 fr=-11024.8:0.200394:11025;11 plot(fr,X3,'r')12 Y1=fft(output);13 Y2=fftshift(Y1);14 Y3=abs(Y2);
15 figure(6)
16 plot(fr,Y3,'b')17 figure(7)
18 plot(fr,X3,'r')19 hold20 plot(fr,Y3,'b')
33..44..22 DD iiss ccuuss ss iioonn oonn FFiinnddiinnggss
Listing 3.3 outputs are shown in Figure 3.8, 3.9 and 3.10. In Figure 3.8, the input soundsignals spectrum is plotted and observed that the frequency range is from -1 to 1 which
means the full frequency range.
This input signal was inputted to the low pass filter called myfilter (defined in line 2 oflisting 3.3) which have cut-off frequency of 0.4 and the output signals spectrum was plotted.
Since the output signal was filter through the low pass filter with 0.4 cut off frequency, on lythe signal within the frequency range of-0.5 to 0.5 were present at the output spectrum.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
15/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 11 of14
FFiigguurree 33..88 SSppee cctt rruumm ooffss ppee ee cchh ss iiggnnaall FFiigguurree 33..99 SSppee cctt rruumm ooff ffii llttee rree dd ss ppee ee cchh
ss iiggnnaall wwiitt hh LLPPFF
Observed clearly with the Figure 3.10, when the two signals were plotted together, it isclearly see that, the signal was starting to attenuate at about 0.3 and totally attenuated at
about 0.5. It is totally expected, since myfilter is defined as low pass filter with order 20
and 0.4 cut-off frequency. Cut-off frequency is determine by half power point and Figure3.10 also explained that the ideal filter could not be obtained in real.
FFiigguurree 33..1100 OO rriigg ii nnaall SSppee ee cchh SSiiggnnaa ll aanndd FFiill ttee rree dd SSiiggnnaa ll
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
16/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 12 of14
33..44..33 FFii llttee rriinngg ooffII mmaaggee
Another filtering application was applied in an image file called flowers.tif Figure 3.11
. imread command is used to read the image file and pass to the filer.
FFiigguurree 33..1111 OO rriiggiinnaa ll PPiicctt uurree
Listing 3.4 list the details procedure on how the filtering of image is performed in MATLABenvironment.
Listing 3.4
1 myfilter = fir1(20,0.2,low);2 inp2 = imread(flowers.tif,tif);3 myfilter2 = ftrans2(myfilter);4 outp2 = imfilter (inp2,myfilter2);5 figure(6)
6 imshow(inp2)
7 figure(7)
8 imshow(outp2)
9 myfilter = fir1(20,0.2,high);10 inp3
= imread(flowers.tif
,tif);
11 myfilter3 = ftrans2(myfilter);12 outp3 = imfilter (inp2,myfilter3);13 figure(8)
14 imshow(outp3)
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
17/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 13 of14
FFiigguurree 33..1122 PPiicctt uurree OOuuttppuutt wwiitt hh LLooww PPaass ss FFiill ttee rr((CCuutt--oo ffffffrree qquuee nnccyy 00..22))
33..44..44 DD iiss ccuuss ss iioonn oonn FFiinnddiinnggss
The output of the low pass filter with cut-off frequency of 0.2 is displayed in Figure 3.12. It
is obviously that the output figure is much unclear compare with original picture due to thefiltering effect.
FFiigguurree 33..1133 PPiiccttuurree OOuutt ppuutt wwiitt hh HHiigghh PPaass ss FFiillttee rr
((CCuutt--oo ffffffrree qquuee nnccyy 00..22))
The same input picture was applied to the high pass filter and the output picture is shown onFigure 3.13. Comparing two outputs, low-pass filters output tends to white color and high-
pass filters output tends to black color when most of the frequencies components are filtered.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
18/22
EE2071: Laboratory 2A School of Electrical andLaboratory Experiment Report (L217) Electronic Engineering
_____________________________________________________________________
Page 14 of14
44.. CCOONNCCLLUUSSIIOONN
This experiment introduced the powerful signal analysis tool, MATLAB, to perform the
Fourier Transforms of the functions and plotting of spectrums of difference signals. Fouriertransform provide a great mathematical tool when converting the functions from time domain
to frequency domain. The concept of frequency domain and time domain were studies andthe frequency domain spectrums were highly focused.
Filterapplication on real life signals were also studied. Sound signals were passed to low-pass filter and their spectrums were plotted. Lastly, a picture file was filtered with both low-
pass filter and high-pass filer and their results were study.
****************************
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
19/22
RREEFFEERREENNCCEESS
[1] Laboratory Manual, Experiment No. 217, Fourier Representation of Signalsand Filtering. Nanyang Technological University, School of Electrical and ElectronicEngineering. (Unpublished)
[2] http://en.wikipedia.org/wiki/
[3] EE2010 Signal and System, Lectures note, Nanyang TechnologicalUniversity, School of Electrical and Electronic Engineering. (Unpublished)
[4] MATLAB documentations
[5] M.J. Roberts, Signals and Systems Analysis Using Transform Methods andMATLAB, International Edition 2003, Mc Graw Hill.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
20/22
Appendix
Basic MATLAB Commands
FOURIER : Fourier integral transform
F = FOURIER(f) is the Fourier transform of the sym scalar f with default independentvariable x. The default return is a function of w.
SYM : Construct symbolic numbers, variables and objects
S = SYM(A) constructs an object S, of class 'sym', from A. If the input argument is a
string, the result is a symbolic number or variable. If the input argument is a numericscalar or matrix, the result is a symbolic representation of the given numeric values.
IFOURIER Inverse Fourier integral transform
f = IFOURIER(F) is the inverse Fourier transform of the scalar sym F with defaultindependent variable w. The default return is a function of x. The inverse Fourier
transform is applied to a function of w and returns a function of x: F = F(w) => f =f(x). If F = F(x), then IFOURIER returns a function of t: f = f(t). By definition, f(x) =1/(2*pi) * int(F(w)*exp(i*w*x),w,- inf,inf) and the integration is taken with respect to
w.
EZPLOT : Easy to use function plotter
EZPLOT(f) plots the expression f = f(x) over the default domain -2*pi < x < 2*pi.EZPLOT(f, [a,b]) plots f = f(x) over a < x < b. For implicitly defined functions, f =f(x,y)
FIGURE : Create figure window
FIGURE, by itself, creates a new figure window, and returns its handle. FIGURE(H)
makes H the current figure, forces it to become visible, and raises it above a ll otherfigures on the screen. If Figure H does not exist, and H is an integer, a new figure iscreated with handle H.
SIMPLIFY : Symbolic simplification
SIMPLIFY(S) simplifies each element of the symbolic matrix S.
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
21/22
INT : Integrate
INT(S) is the indefinite integral of S with respect to its symbolic variable as definedby FINDSYM. S is a SYM (matrix or scalar). If S is a constant, the integral is with
respect to 'x'.
WAVREAD : Read Microsoft WAVE (".wav") sound file
Y=WAVREAD(FILE) reads a WAVE file specified by the string FILE, returning the
sampled data in Y. The ".wav" extension is appended if no extension is given.Amplitude values are in the range [-1,+1].
FILTER : One-dimensional digital filter
Y = FILTER(B,A,X) filters the data in vector X with the filter described by vectors Aand B to create the filtered data Y. The filter is a "Direct Form II Transposed"
implementation of the standard difference equation:
a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)- a(2)*y(n-1) - ... - a(na+1)*y(n-na)
SOUND : Play vector as sound
SOUND(Y,FS) sends the signal in vector Y (with sample frequency FS) out to thespeaker on platforms that support sound. Values in Y are assumed to be in t he range -
1.0
-
8/2/2019 l217_formal_report Fourier Representation of Signals and Filtering
22/22
FTRANS2:Design 2-D FIR filter using frequency transformation
H = FTRANS2(B,T) produces the 2-D FIR filter H that corresponds to the 1-D FIR
filter B using the transform T. (FTRANS2 returns H as a computational molecule,which is the appropriate form to use with FILTER2.) B must be a 1 -D odd- length(type I) filter such as can be returned by FIR1, FIR2, or REMEZ in the Signal
Processing Toolbox.
IMFILTER : Multidimensional image filtering
B = IMFILTER(A,H) filters the multidimensional array A with the multidimensional
filter H. A can be logical or it can be a nonsparse numeric array of any class anddimension. The result, B, has the same size and class as A.
IMSHOW : Display image
IMSHOW(I,N) displays the intensity image I with N discrete levels of gray. If youomit N, IMSHOW uses 256 gray levels on 24-bit displays, or 64 gray levels on other
systems.