Can someone help me with a question to do with sequences and creating a function file that find n terms of sequence
조회 수: 1 (최근 30일)
이전 댓글 표시
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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!