I have a 20x1 vertical matrix. I want to take the averages of the pairs in order and display them in another matrix. How?
古いコメントを表示
To elaborate. I want to average the first and second numbers, third and fourth numbers, etc.. and display them again in a 10x1 matrix.
採用された回答
その他の回答 (1 件)
Honglei Chen
2012 年 6 月 28 日
編集済み: Honglei Chen
2012 年 6 月 28 日
x = rand(20,1);
y = transpose(mean(reshape(x,2,10)))
カテゴリ
ヘルプ センター および File Exchange で Data Types についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!