How do i calculate summations using a loop structure?

1 visualización (últimos 30 días)
Amanda Kit Ting
Amanda Kit Ting el 5 de Oct. de 2013
Comentada: Amanda Kit Ting el 5 de Oct. de 2013
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.

Respuesta aceptada

cr
cr el 5 de Oct. de 2013
sum((1:6).^p)
use various values of p and you get the result.
  1 comentario
Amanda Kit Ting
Amanda Kit Ting el 5 de Oct. de 2013
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by