Frequency spectrum for a square pulse help?
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I need to plot the frequency spectrum for a square wave using MATLAB. The wave is HIGH (5mV) between 0 and -2 and LOW (omv) between 0 and 2. I have already obtained the fourier seires for this function and i have the first ten components of the series.
(5/2) + ((10/pi)*sin((pi*t)/2)) + ((10/(3*pi))*sin((3*pi*t)/2)) + ((10/(5*pi))*sin((5*pi*t)/2)) + ((10/(7*pi))*sin((7*pi*t)/2))+ ((10/(9*pi))*sin((9*pi*t)/2))+ ((10/(11*pi))*sin((11*pi*t)/2))+ ((10/(13*pi))*sin((13*pi*t)/2))+ ((10/(15*pi))*sin((15*pi*t)/2))+ ((10/(17*pi))*sin((17*pi*t)/2))+ ((10/(19*pi))*sin((19*pi*t)/2))
How do I plot the frequency spectrum for this wave using MATLAB? I have tried using FFTs, but I really don't know how it works to plot the graph. I end up with the frequencies peaks at the right points, but with wrong amplitudes. Please help
0 Kommentare
Antworten (1)
Image Analyst
am 27 Nov. 2013
Assuming your series is correct, then plotting the coefficients [5/2, (10/pi), (10/(3*pi)), etc.] should give you the same shape as if you plotted the magnitude of the spectrum you get from the fft() function. Did you do that? Do you want to attach your script for further help?
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!