how do I write sigma notation in matlab?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
David Zhang
el 12 de Oct. de 2016
Respondida: Walter Roberson
el 12 de Oct. de 2016
how do I write sigma notation in matlab?
0 comentarios
Respuesta aceptada
Walter Roberson
el 12 de Oct. de 2016
You need the symbolic toolbox, and you use the symsum() function
Note, however, that symsum has the limitation that you cannot use symbols to index an array. For example you cannot say
A = [2 5 8];
syms k
symsum( k*A(k).^k, k, 1, 3)
If you need to index into an array as part of the formula, then MATLAB requires you to form the definite expressions and then sum() them:
K = 1 : 3;
sum( K .* A(K) .^ K )
Notice the array is not being indexed by a symbol here.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!