Question: Fourier coefficients.

Hi all

I need to find the fourier coefiicients.  In the following Maple program I get the fourier transform of the signal which is fine, BUT actually I am interested in finding A0, An and Bn of the signal denoted by Plot(f(t),t=0..2*Pi);

step:= 2*Pi/2000;
   start_point1:=Pi/3+Pi/6;
   duration1:=Pi/3;
   start_point2:=4*Pi/3-Pi/6;
   duration2:=Pi/3;
   f:= t -> piecewise(t >= start_point1 and t <= start_point1 + duration1,2,
                  t >= start_point2 and t <= start_point2 + duration2,1,
                  0);
   plot(f(t),t=0..2*Pi);
   data:= Array(0..2000, i -> f(i*step));
   Y:= DiscreteTransforms:-FourierTransform(data);
   plot(<seq(<(i-1)*2*Pi/2000| abs(Y[i])>, i=1..2001)>);

Thanks

A.Q

Please Wait...