finding average
Show older comments
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 Comments
Wayne King
on 2 Oct 2011
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
on 2 Oct 2011
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
on 3 Oct 2011
@Image Analyst: I started to hesitate before answering, after this has happened 8 times in one week.
Answers (1)
Andrei Bobrov
on 2 Oct 2011
EEG0ave = sum(EEG0,2)/size(EEG0,2); % you average without mean function
etc.
1 Comment
Jan
on 3 Oct 2011
@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.
Categories
Find more on EEG/MEG/ECoG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!