the problem with mean function
Ältere Kommentare anzeigen
i use this function to build the mean of vector:
% mean_phase=mean(reshape(phase(:),25,[]))
i get this error with the size of the vector:
*Product of known dimensions, 25, not divisible into total number of elements*
How could i solve this Problem ?
Akzeptierte Antwort
Weitere Antworten (1)
Rica
am 8 Nov. 2012
0 Stimmen
1 Kommentar
Andrei Bobrov
am 8 Nov. 2012
Bearbeitet: Andrei Bobrov
am 8 Nov. 2012
use Statistics Toolbox
nanmean(reshape([phase(:);nan(mod(-numel(phase),25),1)],25,[]));
or use Image Processing Toolbox
blockproc(phase(:),[25,1],@(x)mean(x.data));
Kategorien
Mehr zu Descriptive Statistics finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!