How do I take the average of every 50th term in a 2500x1 vector?
33 ビュー (過去 30 日間)
古いコメントを表示
I have a 2500x1 vector and I'm trying to find if the average of the average of every 50th term equals the average of all 2500 variables.
0 件のコメント
採用された回答
Stalin Samuel
2017 年 9 月 15 日
s=rand(2500,1); %2500x1 vector
Out1=mean(reshape(s,[50 50])); %mean of every 50 values
out2=mean(s(50:50:2500)) % mean of every 50th value
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!