1 Up votes0 Down votes

424 views3 pagesTutorial for FTT in MATLAB with example

Nov 03, 2010

© Attribution Non-Commercial (BY-NC)

PDF, TXT or read online from Scribd

Tutorial for FTT in MATLAB with example

Attribution Non-Commercial (BY-NC)

424 views

Tutorial for FTT in MATLAB with example

Attribution Non-Commercial (BY-NC)

- Neuromancer
- The E-Myth Revisited: Why Most Small Businesses Don't Work and
- How Not to Be Wrong: The Power of Mathematical Thinking
- Drive: The Surprising Truth About What Motivates Us
- Chaos: Making a New Science
- The Joy of x: A Guided Tour of Math, from One to Infinity
- How to Read a Person Like a Book
- Moonwalking with Einstein: The Art and Science of Remembering Everything
- The Wright Brothers
- The Other Einstein: A Novel
- The 6th Extinction
- The Housekeeper and the Professor: A Novel
- The Power of Discipline: 7 Ways it Can Change Your Life
- The 10X Rule: The Only Difference Between Success and Failure
- A Short History of Nearly Everything
- The Kiss Quotient: A Novel
- The End of Average: How We Succeed in a World That Values Sameness
- Made to Stick: Why Some Ideas Survive and Others Die
- Algorithms to Live By: The Computer Science of Human Decisions
- The Universe in a Nutshell

You are on page 1of 3

There are many ways to define FFT in MATLAB in this tutorial is one of them:

the frequency domain so we want to use Fourier transform but in MATLAB there is FFT

(Fast Fourier Transform) which deals with sampled signals so the first step is to sample

our signal:

( ) which is and from shannon’s sampling theorem must be

greater than twice the highest frequency component of the signal.

resolution( ) represent minimum change in the signal to represent it in freq.

domain better and help us to define the frequency vector and represent a

large period of time so if we divide by we get the number of the samples in

this period of signal.

Third step is to define the frequency vector and time vector (why?)

We define the time vector to represent our signal in the time domain and the

frequency vector because we will draw the signal’s frequency components

In the freq domain.

%(why?) to make it equal in size with the frequency

% %vector (why? :D) we will know later why. We multiply

% %by TS to make time points at TS ,2TS,3TS…. (times of

sdsdsd %samples).

1

f=(1:N)*df; %begin the vector from 1 or 0 not important but make

%sure it the same size as time vector. We multiply by df as

%we multiply time vector by TS .This issue to be clear lets

%give example if FM=16Khz,df=FM/4=4khz,N=256,so if

%we don’t multiply by df vector frequency will be [1 2 3

% ….255] represent nothing of the freq. components of

%the signal. But if we multiply by df so frequency vector

%will be [1,2……..255]*4khz ,so the first point at 4khz

%the second point at 8khz etc….

Fourth step is to represent our Xt signal using time vector for example our signal

is sine wave with frequency FM.

Xt=sin(2*pi*FM*t);

The last step is to define FFT the function is fft(my signal)/no.of samples

We divide by N to be normalized fft.

Xf=fft(Xt)/N;

%not the same size as freq. vector we will not be able to

%draw Xf with the freq. vector because Xf is the same

%size as Xt as it’s came from it and Xt is the same size as

%the time vector and in stem we draw f(freq. vector)

%with Xf which they must be equal in size to be drawn in

%MATLAB so size(t)=size(f)=size(Xt)=size(Xf).

2

Example:

Code:

fm=3e3; fs=32*fm; ts=1/fs;

df=fm/64; to=1/df; n=to/ts;

t=(0:n-1)*ts;

f=(1:n)*df;

xt=sin(2*pi*fm*t);

figure(1);plot(t,xt);axis([0 0.6e-3 -1 1]);

xf=fft(xt)/n;

figure(2);stem(f,abs(xf));axis([0 6e3 0 0.7]);

Results:

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1

0 1 2 3 4 5 6

-4

x 10

0.6

0.5

0.4

0.3

0.2

0.1

0

0 1000 2000 3000 4000 5000 6000

- Cochin University of Science and TechnologyUploaded byIndiaresult
- Mathematics - Fourier Transforms Using MATLABUploaded byapi-3833675
- A comparison of mel-frequency cepstral coefficient (MFCC) calculation techniquesUploaded byJournal of Computing
- Fft+MatlabUploaded byhikol
- LinWSJThgmjgjghjUploaded byMijoe Joseph
- 17342627 Classification of Services Www Management Source Blog Spot Com (1)Uploaded byRaghavendra Singh Singh
- FFT Matlab TutorialUploaded byichwan13
- Mathematics of the Discrete Fourier Transform (DFT) With Audio ApplicationsUploaded byA. Villa
- ctss_basic_signalsUploaded bysarthak.lad
- HW1Uploaded byWilliam Symionow
- CANON Service Manual iPF780 760 750 series iPF785.pdfUploaded byNicola Fontanella
- FftUploaded byDaniel Araya Rocha
- Digital Image ProcessingUploaded byDheeraj
- 168_PaperUploaded byAli Yasin
- IJIRAE::HIGH PERFORMANCE SPLIT RADIX FFTUploaded byIJIRAE- International Journal of Innovative Research in Advanced Engineering
- 20 Multiscale Vessel EnhancementUploaded byM Rameez Ur Rehman
- lec10aUploaded bySayonaraNo
- Analysis and Signal ProcessingUploaded byBogdan Bumbacea
- Tutorial for Fourier SeriesUploaded bythaonguyen215
- Remote ControlUploaded byMario D
- instrumentoUploaded byHenry Cruz
- Water Treatment2 (SV) - 21.3.2007Uploaded byPrudhvi Raj
- A Novel Method Using Local and Global Features for Face Recognition-2018-01-11-8Uploaded byAnonymous vQrJlEN
- CSE EEE Prerequisites 2006Uploaded byAs Abraham
- Test EngineerUploaded byapi-77898559
- CFD-S07CP_988982301Uploaded byAnthony Resse Reynolds
- Undefined Adjacent Cell MeasurementUploaded bymohdhasn
- Only4engineer.com Communication Question PaperUploaded byubyisismayil
- Hyperchaos to Secure Communications According to Synchronization by a High Gain ObserverUploaded byNAJOUA SOUAD LAGMIRI
- YASKAWA NX100 Instruction For Ang. output func.pdfUploaded byRafael

- Ch 22_Maxwell Stress Tensor.pdfUploaded byArtemis Karvounis
- EllipseUploaded byAt Tanwi
- grade seven video resourcesUploaded byapi-235614705
- W. D. Joyner - Mathematics of the RubikUploaded bypahelwan
- HW 2Uploaded byDillon Thomas Hanni
- economicsUploaded byDarvin McMaster
- An Approximate Reflectance Profile for Efficient Subsurface ScatteringUploaded bymerocgi
- Variables & Functions in Comsol 4Uploaded byted
- r5100102-mathematics-iUploaded bysivabharathamurthy
- PhilippHahn_MS_thesis_presentation.pdfUploaded bybardock277
- Flip Book DirectionsUploaded byRebecka Kermanshahi Peterson
- MTH501_MID_SPS2006Uploaded bynaseem hameed
- Ladder Operators and the Quantum Harmonic OscillatorUploaded byWilliam Talmadge
- Matlab Code for Calculus ThreeUploaded byryan_martin_53
- IB-02Locus(6-7)Uploaded byeamcetmaterials
- 7 Simplex MaximizationUploaded byGerard Espina
- SOLUTION MANUAL Fundamentals of Applied Electromagnetics (6th Ed., Fawwaz T. Ulaby)Uploaded byPaul Cary
- Wood, Bailey: Elementary CalculusUploaded bypeti5_1
- 9709_Oct-Nov-2010-All-Question-Papers.pdfUploaded byRaisa Binte Huda
- Hybrid Systems_TutorialUploaded byKarthik Vazhuthi
- CBSE XI Text BooksUploaded bymsk5in
- Radius Particle Swarm OptimizationUploaded byJoel Carpenter
- Composite Functions IntroUploaded bykasutbiru
- Graph RevisionUploaded bySebastian Foo
- Nhom2_A. Bogobowicz, Theoretical aspects of modeling and control of water quality in a river section, Appl. Math. Comp. 41 (1991) 35–60.Uploaded bycuxuanthanh
- AE6382-11-3D-plotting.pptUploaded byVishnu S. M. Yarlagadda
- Febmarch 2012 NSC Mathematics P1 Feb-March 2012 Memo Eng.pdfUploaded byBalkis
- QUESTION BANK FOR MATHEMATICS - II REGULATION 2013Uploaded byPRIYA RAJI
- Clifford AlgebrasUploaded byjoseamh69062247
- HW 2Uploaded byBar Graph

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.