How to sum a series of functions and then plot the sum?
Mostrar comentarios más antiguos
This function is supposed to be able to plot a box filter:

That should possibly look like this:

I already defined t as a 1x360 double array using:
t = t = linspace(0, 4, 360)
syms k
z = symsum( (1 / k) * sin((2 * pi) * k * t ), k, 1, 10) ;
It returns a 1x360 sym variable, but I don't know how to plot it.
3 comentarios
Stephen23
el 1 de Mzo. de 2018
@Shaun Pedicini: Is there a particular reason why you need to use symbolic math?
Shaun Pedicini
el 1 de Mzo. de 2018
Walter Roberson
el 1 de Mzo. de 2018
Z = double(z);
plot(t, Z)
Your MATLAB is detecting that the input is sym and is doing the double() on your behalf, but you can make what you are doing more obvious by doing the double() yourself.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!