Skip to main content
7 events
when toggle format what by license comment
Apr 22, 2013 at 11:56 comment added Dilip Sarwate @BRabbit27 See edited answer.
Apr 22, 2013 at 11:55 history edited Dilip Sarwate CC BY-SA 3.0
included explanations from comments
Apr 22, 2013 at 6:46 comment added BRabbit27 Ok. I'll check it and I got for $a_0 = 1/4$ and $a_n = \frac{1-cos(\pi n)}{2\pi ^2 n^2}$. Is this better? By the way, I computed this with the separate formulas for $a_0$, $a_n$. But when I used the general formula $c_n$ I got the previous result, why am I not getting the $1/4$ when using the latter?
Apr 21, 2013 at 22:58 comment added Dilip Sarwate Check your work again for $n=0$ because $\hat{f}_0$ is the "DC value" which is obviously not $0$. In general, whatever you or MATLAB or Mathematica or... is doing when calculating $\hat{f}_n$ cannot be extrapolated to $\hat{f}_0$ because the antiderivative $$\int \cos(n\omega t)\,\mathrm dt = \frac{\sin(n\omega t)}{n\omega}$$ cannot be used when $n=0$.
Apr 21, 2013 at 22:04 comment added BRabbit27 Thank you very much, that helped a lot. So, the values of $n$ have to be always integers right? As for the coefficients' formula, I checked it twice and I don't see any error but I do see that $\hat f_0$ becomes undefined... I checked also the fourier transform of a triangle signal and it is $sinc(w)^2$ which will explain the undefined value at 0, apart from that I can't see other errors.
Apr 21, 2013 at 21:59 vote accept BRabbit27
Apr 21, 2013 at 21:18 history answered Dilip Sarwate CC BY-SA 3.0