the problem with mean function
3 ビュー (過去 30 日間)
古いコメントを表示
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 ?
0 件のコメント
採用された回答
Pedro Villena
2012 年 11 月 8 日
編集済み: Pedro Villena
2012 年 11 月 8 日
mean_phase=mean(reshape(phase(1:25*floor(numel(phase)/25)),25,[]))
0 件のコメント
その他の回答 (1 件)
Rica
2012 年 11 月 8 日
1 件のコメント
Andrei Bobrov
2012 年 11 月 8 日
編集済み: Andrei Bobrov
2012 年 11 月 8 日
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));
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!