Scilab-2.4 (July 12, 1998) Copyright (C) 1989-98 INRIA Startup execution: loading initial environment -->horn_period_1 = loadwave('horn_period_1.wav'); Reading Wave file: Microsoft PCM format, 1 channel, 44100 samp/sec 88200 byte/sec, 2 block align, 16 bits/samp, 1452 data bytes Input file: using sample rate 44100 size shorts, style signed (2's complement), 1 channel -->plot2d(horn_period_1); -->horn_spectrum_1_1 = fft(horn_period_1, -1); -->xbasc(); -->plot2d(abs(horn_spectrum_1_1)); -->xbasc() -->plot2d(abs(horn_spectrum_1_1(1:50))); -->xbasc() -->plot2d(abs(horn_spectrum_1_1(1:25))); -->horn_spectrum_1_1(1:21)' ans = ! - 1.839E-15 ! ! 6.3315007 + 3.1397456i ! ! 2.4078011 + 13.89031i ! ! - 14.391669 + 14.390421i ! ! - 35.141659 + .3307903i ! ! - 30.637255 - 25.59816i ! ! - 12.564497 - 58.052689i ! ! 48.828733 - 41.371947i ! ! 46.606208 + 15.830319i ! ! 9.7633612 + 32.971872i ! ! - 19.910462 + 15.716832i ! ! - 11.95423 - 6.0675731i ! ! - 1.1814681 - 8.7873691i ! ! 3.9905353 - 4.9504942i ! ! 4.4550595 + .0266806i ! ! 2.6291955 + 2.4229177i ! ! - .4063534 + 2.4452245i ! ! - 1.7324988 + 1.0533957i ! ! - 1.0191908 - .6054199i ! ! - .0649969 - .6021413i ! ! .2299578 - .1274739i ! -->abs(horn_spectrum_1_1(1:21)') ans = ! 0. ! ! 7.0672415 ! ! 14.097454 ! ! 20.352011 ! ! 35.143216 ! ! 39.923767 ! ! 59.396812 ! ! 63.999088 ! ! 49.221313 ! ! 34.387026 ! ! 25.366224 ! ! 13.405934 ! ! 8.866438 ! ! 6.3585978 ! ! 4.4551394 ! ! 3.57536 ! ! 2.478759 ! ! 2.0276081 ! ! 1.1854464 ! ! .6056391 ! ! .2629262 ! -->arg(horn_spectrum_1_1(1:21)') !--error 4 undefined variable : arg -->getf('fourier_demo.sci') -->arg(horn_spectrum_1_1(1:21)') ans = ! - 3.1415927 ! ! .4603564 ! ! 1.399158 ! ! 2.3562379 ! ! 3.1321799 ! ! - 2.445563 ! ! - 1.7839414 ! ! - .7029169 ! ! .3274347 ! ! 1.2829105 ! ! 2.4733637 ! ! - 2.6719098 ! ! - 1.7044456 ! ! - .8923540 ! ! .0059888 ! ! .7445908 ! ! 1.7354738 ! ! 2.5952962 ! ! - 2.6055817 ! ! - 1.678323 ! ! - .5061661 ! -->plot_spectrum(horn_spectrum_1_1, 0, 44100); -->xbasc() -->plot_spectrum(horn_spectrum_1_1, 0, 44100); -->xbasc() -->plot_spectrum(mtlb_fftshift(horn_spectrum_1_1), -22050, 22050); -->xbasc() -->plot_spectrum(horn_spectrum_1_1(1:25), 0, 44100*25/size(horn_spectrum_1_1,2)); -->(arg(horn_spectrum_1_1(1:21)')/%pi+1)/2 ans = ! 0. ! ! .573268 ! ! .7226829 ! ! .8750069 ! ! .9985019 ! ! .1107766 ! ! .2160769 ! ! .3881273 ! ! .5521129 ! ! .7041815 ! ! .8936481 ! ! .0747524 ! ! .2287291 ! ! .3579774 ! ! .5009531 ! ! .6185053 ! ! .7762092 ! ! .9130542 ! ! .0853088 ! ! .2328866 ! ! .4194412 ! -->