How to average spectrograms of real signals
조회 수: 5 (최근 30일)
표시 이전 댓글
Hello, I'm trying to average spectrograms of different trials of a voltage signal from an EEG electrode. I'm just not sure that I'm doing it correctly because I don't know much about this subject.
ov = 8;
sg = 24;
Fs = 128;
for i=1:80
[~,~,~,spec(:,:,i)] = spectrogram(trials(i,:),sg,ov,[],Fs);
end
m_spec = mean(spec,3);
[~,F,T] = spectrogram(trials(1,:),sg,ov,[],Fs);
imagesc(F,T,10*log10(m_spec)),axis xy,colormap(jet);
this is based on something I saw here on the website but I'm not sure about it. I know from my teacher that i need to average the "pxx arguements" of the spectrogram, and I thought it's the PSD variable from the documentation:" [S,F,T,P] = spectrogram(...) P is a matrix representing the Power Spectral Density (PSD) of each segment. "
Thank you, sorry if the question is confused.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!