Generalized Iterative Function Building Upon Itself

I'm trying to implement a function where, for instance, [M] = [3 4 5 6] and I want to get a matrix N where N(1,1) = M(1,1) N(1,2) = M(1,2) + N(1,1) N(1,3) = M(1,3) + N(1,2) N(1,4) = M(1,4) + N(1,3)
I'm trying to generalize the function so that a user can enter in a value 'n' that correlates to the number of columns in the matrix.

回答 (1 件)

Steven Lord
Steven Lord 2018 年 6 月 14 日

0 投票

See the cumsum function.

この質問は閉じられています。

タグ

質問済み:

2018 年 6 月 14 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by