Continuing on from my previous post, Bouncing Ball Animation, here's another great example of using animation to illustrate mathematical concepts. In this example by Mehmet, a Fourier series is illustrated using circles. The first animation shows the first few terms individually, and the second animation shows the sum of the terms.
I have one suggestion for improvement in his code. In order to create the animation, Mehmet re-plots the graphics inside a for-loop. A more efficient, and recommended, way is to plot once and only update the X and Y data of the graphics objects inside the loop.
要发表评论，请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。