Please take a look at point no. 9 of the following instruction sheet concerning your query.
The command dft() has been removed in the latest versions of Scilab. See the help for fft() <a href="https://help.scilab.org/docs/6.1.0/en_US/fft.html" target="" title="">here</a>. See the last example on that page on "Using explicit formula for 1-D discrete Fourier transform".