How do i calculate summations using a loop structure?

조회 수: 1 (최근 30일)
Amanda Kit Ting
Amanda Kit Ting 2013년 10월 5일
댓글: Amanda Kit Ting 2013년 10월 5일
Hi guys, I'm having trouble trying to put this summation: top of ∑ is N bottom of ∑ is j=1 side of ∑ is j^p For p=1,2,3 and N=6 how do i solve this using matlab? i keep getting error messages.

채택된 답변

cr
cr 2013년 10월 5일
sum((1:6).^p)
use various values of p and you get the result.
  댓글 수: 1
Amanda Kit Ting
Amanda Kit Ting 2013년 10월 5일
thx for your help. i thought you will need more complex code for this question. Cause this is my first time using Matlab to calculate problems. i appreciate it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by