Mean column with step
3 ビュー (過去 30 日間)
古いコメントを表示
I have a column vector of n elements, i would like to calculate the mean with a step of 10 (the mean of 10th, 20th, and so on). thanks
0 件のコメント
採用された回答
その他の回答 (1 件)
Matt J
2018 年 8 月 28 日
編集済み: Matt J
2018 年 8 月 28 日
Assuming n is a multiple of 10 (otherwise you should pad the vector), you can use SEPBLOCKFUN (Download),
out = sepblockfun(theVector,[10,1],'mean')
1 件のコメント
Matt J
2018 年 8 月 28 日
tiffani commented
I think this is not my aim, the output will be a simple number, which is the mean each 10th elements in the vector, with this function sepblockfun i get a vector as output
参考
カテゴリ
Help Center および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!