How to sum a series of functions and then plot the sum?
Show older comments
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 Comments
Stephen23
on 1 Mar 2018
@Shaun Pedicini: Is there a particular reason why you need to use symbolic math?
Shaun Pedicini
on 1 Mar 2018
Walter Roberson
on 1 Mar 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.
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!