Code running multiple times for different elements of a matrix
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone. I need some help to code this problem:
The data is 480x10 matrix(ret). I want to calculate the mean of each column from the past 120 elements of the same column
m1=mean(ret(1:120,1:10))
m2=mean(ret(2:121,1:10))
...
m360=mean(ret(360:480,1:10))
How can i do it with a loop and receive the results in a matrix 360x10.
1 件のコメント
採用された回答
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!