Summing an array and plotting it.

조회 수: 1 (최근 30일)
Yarne Schlösser
Yarne Schlösser 2020년 10월 12일
답변: madhan ravi 2020년 10월 12일
I am trying to write an script to add values from an array. Let's say.
A = [0,1,2,3,4]
I am looking for something which does the following
Step 1: 0
Step 2: 0+1 = 1
Step 3 = 0+1+2 = 3
Step 4 = 0 +1+2+3 = 6 and this for the whole array.
How would I also plot this script?
Kind regards.

답변 (1개)

madhan ravi
madhan ravi 2020년 10월 12일
doc cumsum
doc plot

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by