cumulative sum in matrix

1 次查看(过去 30 天)
Joseph Lee
Joseph Lee 2017-10-23
回答: Stephen23 2017-10-23
How do i generate a 5x10 matrix such as:
Z1 Z2 Z3 ... Z4 Z5 Z6 Z7 Z8 Z9 Z10 ( each Z is a random number)
Z1+Z1' Z2+Z2' Z3+Z3' ( cumulative sum of previous Z value with Z', Z' is a new random number)
.
.
Z1+Z1'+Z1''+Z1'''+Z1''''

采纳的回答

Stephen23
Stephen23 2017-10-23
cumsum(rand(5,10),1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Optics 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by