How to Plot Truncated Summation Functions without any add-ons

3 views (last 30 days)
Hello, I'm trying to figure out how to go about plotting a truncated summation function such as
without the use of any add-ons. Almost every resourse I'm finding for Matlab requires a toolbox add-on that I do not have access to, such as PDF from the stats/machine toolbox, or syms from the symbolic math toolbox. If anyone could give a hint on how to approach this, I would apprectate it.

Answers (1)

David Hill
David Hill on 20 Feb 2022
plot(x,y(3,x),x,y(10,x),x,y(20,x));%plot vs. different values of M
  1 Comment
Anthony Koning
Anthony Koning on 20 Feb 2022
I appreciate the answer, but the graph of this plot doesn't make much sense to me, just being straight lines. I understand it compares a handful of values for N, but shouldn't the graph have a sinusoidal shape since the graph is a sum of cosines?

Sign in to comment.


Find more on Specifying Target for Graphics Output 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!

Translated by