% sin_wave = sin(2*pi*index*(rate/Fs))


n=0:47999;

Fs = 48000;

rate = Fs/length(n);

wave = sin(2*pi*n*(rate/Fs));

plot(wave);
filename = 'sin_table.dat';

delete filename;
fid = fopen(filename, 'w');
%fwrite(fid, wave, 'float32');     %write out the array of floats

%sample playback Analog Devices example uses this code

max_samp_delay = 144;

for i = 1:length(wave)% - 1,
    fprintf(fid,'%d, \n',ceil( abs(wave(i)) * max_samp_delay ) );
end

fclose('all');