clear all
close all
clc

[y, fs] = audioread("sound/modulator22.wav");
times = [];
item_num = 20;
for j = 1:item_num
  localtime = [];
  for i = 0:1
    t0 = clock ();
    frequencySpectrum_noplot(y, fs, 0); %true does FFT, false DFT
    localtime(i+1) = etime (clock (), t0);
  endfor
  times = [times; localtime];
endfor

printf('Average DFT time: %d \n', mean(times(1:item_num, 1)))
printf('Standard deviation of DFT time: %d \n', std(times(1:item_num, 1)))
printf('Average FFT time: %d \n', mean(times(1:item_num, 2)))
printf('Standard deviation of FFT time: %d \n', std(times(1:item_num, 2)))