필터 지우기
필터 지우기

Stacking of of power spectrum

조회 수: 1 (최근 30일)
Chris Martin
Chris Martin 2023년 1월 19일
답변: Daksh 2023년 2월 3일
I have computed power spectrum of number of time series of various stations. Can I stack the spectra to one power spectrum plot?
I have simply took all the spectra, and plotted but I need a single line spectra? Is there any code? Any lead will be very helpful.
  댓글 수: 4
Chris Martin
Chris Martin 2023년 1월 20일
I am trying to do it in matlab that is why it is matlab issue
Mathieu NOE
Mathieu NOE 2023년 1월 20일
hi
If I understand right , you simply want the mean of all your spectra ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Daksh
Daksh 2023년 2월 3일
I understand that you wish to stack the power spectra plots into a single "stacked" plot in MATLAB.
To display different line spectra on the same plot, you can use "hold on" and "hold off" command in MATLAB to persist plot outputs and superimpose multiple plots together in order to get one combined plot. Refer to the following documentation for "hold":
For example:
load indoors.mat
load outdoors.mat
hold on
plot(indoors.Humidity)
plot(outdoors.Humidity)
hold off
As a 2nd workaround, you can refer to the "stackedplot()" method documentation in MATLAB, which stacks different plots onto a single plot with the common variable axis:
You can use the following MATLAB command to obtain the same output as above:
stackedplot(indoors,outdoors,"Humidity")
Hope this helps!

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by