Originally Posted by
CaptainBlack If I recall correctly yes
CB
I plotted the series in MatLab and got a result that points in an other direction. :-(
Here's the plot I got and the MatLab code I wrote.
MatLab
Code:
N = 20;
x = (-50:50)/20; %interval : [-2.5,2.5]
f = ones(1,101);
%Odd fourier, no a_0 and a_i included.
for i = 1:1:N %from 1 to N
f = f + (2 * sin(pi*i*x)) / (i * pi); %sum all terms over N iterations.
end
plot(x,f)
The function I was aiming for is 1-t and it should hold the points [0,1] and [2,-1] and then jump to next 'slope'. Eh, right?
I guess my question is, is it the series or is the MatLab tinkering that's wrong..?