Compute the average of pwelch

조회 수: 5 (최근 30일)
Tu Nguyen
Tu Nguyen 2022년 4월 6일
편집: Tala 2022년 4월 6일
Hi all
I have eeg signal with 129 samples,
I computed each signal, now I need to take the average of all 129 samples and plot that average. How can I do that?
Please help me.
I reeally appreciate that
clc;
close all;
clear;
load('eeg_Fs250Hz.mat');
[row columm] = size(eeg);
for i = 1:columm
[ppx{i}, f{i}] = pwelch(eeg(:,i),200,100,200,Fs);
figure(1);
plot(ppx{i});
hold on
end

답변 (1개)

Tala
Tala 2022년 4월 6일
not sure what the avarage of pwelch means! maybe avarage energy of your signal? there are better ways to do so...anyways...you could just this after your hold on command.
plot(mean(ppx{i}));
I would add f{i} as well in my plots. meaning plot(f{i}, ppx{i}) to see the frequencies on your plot
  댓글 수: 6
Tu Nguyen
Tu Nguyen 2022년 4월 6일
I got it. Appreciate you a lot
Tala
Tala 2022년 4월 6일
편집: Tala 2022년 4월 6일
my pleasure

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

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by