simhwk9 - Estudiante: Vctor Gonzlez Matrcula: 805386 Tarea...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Estudiante: Víctor González Matrícula: 805386 Tarea - Transformada de Fourier 1) Se modificó las siguientes líneas del programa dado en clase. Oscillator sg = new Oscillator(); // para crear una funsion senoidal sg.setWaveform("Square"); sg.setAmplitude(ampl); sg.setSamplingRate(rate); sg.setFrequency(f[5]); // esta es la frecuencia especificada arriba sg.setSamples(nSamples); boolean addDC = false; sg.setDCLevelState(addDC); if (addDC) sg.setDCLevel(0f); boolean addNoise = false; sg.setNoiseState(addNoise); if (addNoise) sg.setNoise(0f); signal = sg.generate(); // se le asigna la senoidal a la señal Ejecutando con esta nueva programación se obtuvo la siguiente ventana: 2) Programa para obtener la transformada inversa de fourier public final double[] ifftMag (double[] x) { n = x.length; nu = (int)(Math.log(n)/Math.log(2)); int n2 = n/2; double[] ar = new double[n]; double[] ai = new double[n]; double[] mag = new double[n2]; // float scale = (float)Math.sqrt(1.0f/n); float scale =1f; int i,j; for (i=j=0; i<n; ++i) { if (j>=i) { double tempr = x[j]*scale;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

simhwk9 - Estudiante: Vctor Gonzlez Matrcula: 805386 Tarea...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online