average

11 visualizzazioni (ultimi 30 giorni)
Lisa Justin
Lisa Justin il 6 Feb 2012
Modificato: Matt J il 1 Ott 2013
i have a 42*16384. how do i average it so that i get a new matrix of size 42*2048 (if N=2048 represents one revolution and N=16384 represents 8 revolutions).

Risposta accettata

Andrei Bobrov
Andrei Bobrov il 6 Feb 2012
data - your array [42x16384]
EDIT
out = mean(reshape(data,size(data,1),[],8),3);
eg:
data - your array [55x72000]
out = mean(reshape(data,size(data,1),[],3),3);
or
out = squeeze(mean(reshape(data,size(data,1),3,[]),2)) ;
  5 Commenti
Lisa Justin
Lisa Justin il 6 Feb 2012
I am still getting the same error message with
out = squeeze(mean(reshape(data.',size(data,2),8,[]),2)).'
Andrei Bobrov
Andrei Bobrov il 6 Feb 2012
see EDIT

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by