Fourier Series Help
Yes, okay. Invisible question?
Sorry @eta, I posted something below but it doesn't seem to have appeared. So my question is this: http://i.imgur.com/vKjl0zM.png This is my first time ever properly using matlab and I'm still new to fourier series, but does this look like a valid answer? http://i.imgur.com/vKjl0zM.png
Oops, posted the same link twice. Here's the graph: http://i.imgur.com/NLoAZop.png
It isn't meant to say square wave, I forgot to change the title from the last question.
For N=20 (terms), for 0<x<pi, it look like this
Thanks, phi. What did you use to plot that? We don't have to use matlab but I thought of it as the de facto software to use.
matlab
Thanks, how am I meant to plot these in matlab? My code currently looks like this: N = 20; x = [0,pi]; f = 0; for n = 1:1:N f = f + (4/pi) * sin((2*n*x-x)/(2*n-1)); end plot(x,f) But that's not giving me a remotely correct answer so I'm a bit stuck
I've managed to see my mistake, I had a typo in my equation (should be sine of the numerator not the whole fraction). Thanks for your help!
Join our real-time social learning platform and learn together with your friends!