MATLAB: How do i calculate summations using a loop structure

loopsummation

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.

Best Answer

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