//Read the values of the inut textFields of the GUI String FC = jTextField1.getText(); String FR = this.jTFFrecCorte.getText(); String R = this.jTextField3.getText(); String A = this.jTextField4.getText(); //Generate de OCTAVE variables jopas.Load(Double.parseDouble(FC), "FC"); jopas.Load(Double.parseDouble(FR), "FR"); jopas.Load(Double.parseDouble(R), "R"); jopas.Load(Double.parseDouble(A), "A"); //Executes the Octave commands using local variables jopas.Execute("[N,W]=cheb1ord(FC/10000,FR/10000, R , A )"); jopas.Execute("[B,A]=cheby1(N," + R + ",W)"); jopas.Execute("[H,F]=freqz(B,A,512,20000)"); jopas.Execute("modulodB=20*log10(abs(H))"); jopas.Execute("fase=unwrap(angle(H))"); jopas.Execute("Fc=W*10000"); //Write the values at the output textFields this.jTextField6.setText(Double.toString(jopas.Save("N").getRealAt(0,0))); this.jTextField5.setText(Double.toString(jopas.Save("Fc").getRealAt(0,0))); //Plot the graphic representation of the frequency response this.jopasLabel2.paintLabel("F","modulodB", "Módulo","Frecuencia (Hz)", "Módulo (dB)"); this.jopasLabel1.paintLabel("F","fase","Fase", "Frecuencia (Hz)", "Fase (rad)");