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 Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by