fft Amplitude Spectrum Stem Plot from Fourier Series
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
N/A
el 14 de Feb. de 2015
Respondida: Geoff Hayes
el 14 de Feb. de 2015
I want to make a stem plot (amplitude spectrum using stem()) from the fft function in MATLAB, given the Fourier Series function I derived. Is this possible using just the function or do I need to evaluate the function into a txt file and use those numbers to do it (aka read in the file)?
Here is the series I want to analyze:
y(t) = (-10/pi)*Sum_n=1->inf [cos(pi*n)/n * sin(pi*n*t/5]
I know that there are formulas for finding the amplitude spectrum based on coefficients of the series function, but I'm stuck in the interpretation to get them into MATLAB. Is stem() the equivalent of the amplitude spectrum? That's what my prof. used in his code, but, again, his code is based off reading in data from a file. I want to take the function and directly apply it without reading in a file of data.
Thanks in advance!
0 comentarios
Respuesta aceptada
Geoff Hayes
el 14 de Feb. de 2015
Quizmaster - you don't have to read data from a text file in order to use the stem function. It is a visual tool only that is used to plot a discrete sequence of data. I've used it to plot the discretized data that had been sampled from a continuous signal (prior to performing an FFT). A similar question was asked at http://www.mathworks.com/matlabcentral/answers/24116-stem-function-and-fft and includes some code for using stem with the output from an FFT.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!