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 comentarios

Wayne King
Wayne King el 2 de Oct. de 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
Image Analyst el 2 de Oct. de 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
Jan el 3 de Oct. de 2011
@Image Analyst: I started to hesitate before answering, after this has happened 8 times in one week.

Iniciar sesión para comentar.

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 2 de Oct. de 2011

0 votos

EEG0ave = sum(EEG0,2)/size(EEG0,2); % you average without mean function
etc.

1 comentario

Jan
Jan el 3 de Oct. de 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.

Iniciar sesión para comentar.

Categorías

Etiquetas

Preguntada:

el 2 de Oct. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by