# Octave script to plot Fortran FFT output sequence from file.
fid=fopen("abs.txt","r");
[v1,count]=fscanf(fid,'%f',[32, Inf]);
fclose(fid);
x=0:1:31;
pi=3.14159;
t=[0:1/64:1];
xs = sin(2*pi*5*t);
subplot(2,1,1);
plot(t,xs);
title("Test of DIF FFT with 5-hz sine input");
xlabel("t (seconds)");
ylabel("amplitude");
subplot(2,1,2)
stem(x,v1,"r");
text(15,0.45,"|X(f)| output");
ylabel ("|X(f)|");
xlabel ("frequency (hz)");
axis([0,31,0.0,0.55]);
print -dpng fft_nov28.png;