How to plot power spectral density as bar between the max and the min frequency for the first component

조회 수: 1 (최근 30일)
x = CH4d;
f0=3
Fs=10000;
t_i=30; t_f=31.4;
fmin=890; fmax=980;
fs=10000;
dt=max(VarName1d)-min(VarName1d); %=length(VarName1)/fs
t=linspace(0,dt,length(VarName1d));
ts=t(floor(t_i*fs):floor(t_f*fs));
sig=CHcd;
meaned=sig-mean(sig); ms=meaned(floor(t_i*fs):floor(t_f*fs));
[WT,freqWT,wopt]=wt(ms,Fs,'f0',f0,'CutEdges','on','RelTol',0.01,'Wavelet','Morlet','Plot','off');
absWT=abs(WT).^2;
for fn=1:length(freqWT)
mx4(fn)=mean(absWT(fn,~isnan(absWT(fn,:))),2);
end

답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by