// Note: this will work only if lintool.jar is in your CLASSPATH. // If it's not, you can download lintool.jar and use the java -cp option. // // Instructions: // (1) First read the code. Then compile/execute. // (2) Un-comment the code inside the print-loop to only print // the significant spectrum components. import edu.gwu.lintool.*; public class DFTExample { public static void main (String[] argv) { // Get a piece of digitized music. double[] signal = SignalExample.getMusicSample (); // This is the signal f(0), f(1), f(2), ..., f(N-1). int N = signal.length; // Plot Function F = new Function ("song #1"); for (int k=0; k