finding average
이전 댓글 표시
Question
Relaying on what you know about array manipulations, compute an average of 5 evoked potentials in EEG0 and in EEG08, i.e. average 5 columns of data in each matrix array. You should be left with an 500x1vector array after averaging columns of EEG0 and with 500x1 vector array after averaging columns of EEG08. Name the two vector arrays EEG0ave and EEG08ave, respectively.
How do I do this without using mean function in matlab thanks
I AM NEW TO MATLAB.. so i want to see code on how it can be done
댓글 수: 3
Wayne King
2011년 10월 2일
Hi, Welcome to MATLAB! you should show what you have tried and where you have gotten stuck. People are much more inclined to help you if you show that you have made effort. The MATLAB documentation explains basic operations on arrays.
Image Analyst
2011년 10월 2일
Now I see what Jan means about authors deleting questions (http://www.mathworks.com/matlabcentral/answers/16153-is-deleting-threads-helpful-in-this-forum). I answered this earlier today only to find he deleted it and reposted it after slightly rewording it.
Jan
2011년 10월 3일
@Image Analyst: I started to hesitate before answering, after this has happened 8 times in one week.
답변 (1개)
Andrei Bobrov
2011년 10월 2일
EEG0ave = sum(EEG0,2)/size(EEG0,2); % you average without mean function
etc.
댓글 수: 1
Jan
2011년 10월 3일
@Andrei: On one hand it is not recommended to answer homework questions as long as no effort has been shown. On the other hand your solution is a standard usage of Matlab and a direct translation of the mathematical definition. So you do not reveal any secrets.
카테고리
도움말 센터 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!