can't get the right spectrum in scilab I'm trying to write a simple script that should plot the spectrum in scilab, to test it I use a  sinus function with 440hz so that I get my dirac in this position , my problem is that it doesn't work and I don't understand why? 
here's the code :

Fs = 8000;
f = 440;
t= 0:1/Fs:1;
y = sin(2*%pi*f*t);

nf = 1024; // number of point in the DFT
Y = fft(y)
f = Fs/2  * linspace(0,1,nf/2+1);
clf();
plot(f,abs(Y(1:nf/2+1))); 


and this is what I get : 


any idea why I get this ?
Your fft vector Y has the same length as your input signal y, because you just specified nf without letting fft() know what your desired FFT-length is. This is why your peak does not appear at 440 Hz. Your vector Y does not correspond to the frequencies in f. It's just a matter of correct scaling of the x-axis. 

EDIT: I do not know scilab, so I don't know how to pass the desired FFT-length to fft(). If you can't do that, you just need to make your time domain signal have the desired FFT-length.