how to do sum up elements one by one (sequence addition)

조회 수: 3 (최근 30일)
vivek r
vivek r 2017년 1월 8일
답변: Roger Stafford 2017년 1월 9일
[1 2 3 4] to [1 3 6 10] i.e 1=1 ; 1+2=3; 1+2+3=6; so on

답변 (2개)

halleyhit
halleyhit 2017년 1월 8일
just a hint: [1 3 6 10]'=[1 1 1 1;0 1 1 1; 0 0 1 1; 0 0 0 1]*[1 2 3 4]'

Roger Stafford
Roger Stafford 2017년 1월 9일
cumsum([1 2 3 4]) equals [1 3 6 10]

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by