Can someone help me with a question to do with sequences and creating a function file that find n terms of sequence
1 回表示 (過去 30 日間)
古いコメントを表示
Abdullaziz Errayes
2016 年 12 月 11 日
編集済み: Roger Stafford
2016 年 12 月 12 日
Can someone show me the function file that would calculate the first n terms of this sequence a_i=a_(i-1)+3i as well as the sum of the first n terms please!
0 件のコメント
採用された回答
Roger Stafford
2016 年 12 月 12 日
編集済み: Roger Stafford
2016 年 12 月 12 日
a = a_0 + cumsum(3:3:3*n); % The sequence of first n terms
s = sum(a); % The sum of these
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!