[Scilab-users] discrete Fourier transform

Stefan Du Rietz sdr at durietz.se
Thu Mar 21 21:02:51 CET 2013


On 2013-03-21 20:34, haasejos wrote:
--------------------
> good evening,
> what I meant is, that XfA(2) should be "1". Because this value can be
> understood as the amplitude of sin(x). But  XfA(2) beeing calculated with
> XfA=abs(Xf) (see example) returns "100". This is wrong, isn't it?
> Josef
>
-->n = 200;
-->x=linspace(0,2*%pi,n);
-->y=sin(x);
-->Xf=dft(y,-1);
-->XfA = abs(Xf)*2/n;
-->XfA(2)
  ans  =
     0.9974519

/Stefan




More information about the users mailing list