Matlab-Plot Power Spectrum of time series

In summary, the conversation discusses a problem with time series and power spectra. The steps to plot the power spectra and the appropriate frequency range are provided, along with a suggestion to take the log for better visualization.
  • #1
pigasos54
1
0
Hi all,

and thank you for reading/responding to my thread.I have a problem which involves time series and its power spectra.

Some background:
I have an 10.000xN matrix(called matr) whose columns are individual time series with real data values and I want to plot their power spectra against frequency.These time series where generated by an iterative map which involved a sin function with omega=0.1. Plotting freq versus power I might be able to see if any harmonics are present.

Below are the steps I take in Matlab:

y=fft(matr) % get the Fourier transform of the matrix
y=(abs(y)).^2 %this is the power spectra

Is the above right?

Also I'm puzzled as to what frequency range I should use.
Does
freq=(0:10000-1)/10000
seems right?

Any suggestions?
Thank you all
 
Physics news on Phys.org
  • #2
in advance.Yes, the steps you have listed are correct. The frequency range you have chosen is correct as well. You may also want to consider taking the log of your power spectra before plotting it as this will help better display the harmonics of the sin function.
 

1. What is a power spectrum plot in Matlab?

A power spectrum plot in Matlab is a visual representation of the distribution of power in a time series. It shows the relative strength of different frequencies in the data and can help identify any patterns or trends present.

2. How do I create a power spectrum plot in Matlab?

To create a power spectrum plot in Matlab, you can use the "periodogram" function. This function takes in the time series data and returns the power spectrum plot, which can then be customized with different parameters such as window size and frequency range.

3. What does the x-axis represent in a Matlab power spectrum plot?

The x-axis in a Matlab power spectrum plot represents frequency, measured in Hertz (Hz). This is the number of cycles per unit of time in the time series data.

4. How can I interpret a power spectrum plot in Matlab?

In a power spectrum plot, the height of each bar represents the power or strength of a particular frequency in the data. A higher bar indicates a stronger or more dominant frequency. The overall shape of the plot can also provide information about the presence of any periodic patterns or trends in the data.

5. Can I customize the appearance of a power spectrum plot in Matlab?

Yes, you can customize the appearance of a power spectrum plot in Matlab by adjusting various parameters such as the color, line style, and axis labels. You can also add additional features such as a legend or title to make the plot more informative and visually appealing.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
697
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
163
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
10K
Back
Top