How do i calculate summations using a loop structure?

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.

 采纳的回答

sum((1:6).^p)
use various values of p and you get the result.

1 个评论

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 个)

类别

在 帮助中心 和 File 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