Package ca.nengo.model

Examples of ca.nengo.model.Noise


          float radialInput = (ensemble.getDimension() == 1) ? x[j]*encoders[i][0] : x[j];
  //        float radialInput = getRadialInput(ensemble, i, x[j]);
         
          ((NEFNode) nodes[i]).setRadialInput(radialInput);
          try {
            Noise noise=null;
            if (nodes[i] instanceof SpikingNeuron) {
              noise=((SpikingNeuron)nodes[i]).getNoise();
              ((SpikingNeuron)nodes[i]).setNoise(null);
            }
            nodes[i].run(0f, 0f);
View Full Code Here


    public static void main(String[] args) {
        float tau = .01f;
        DynamicalSystem dynamics = new SimpleLTISystem(new float[]{-1f/tau}, new float[][]{new float[]{1f/tau}}, MU.I(1), new float[1], new Units[]{Units.UNK});
        Integrator integrator = new EulerIntegrator(.0001f);
//      Noise noise = NoiseFactory.makeRandomNoise(1000, new GaussianPDF(0, 1));
        Noise noise = NoiseFactory.makeRandomNoise(1000, new GaussianPDF(0, 1), dynamics, integrator);
//      Noise noise = NoiseFactory.makeNullNoise(1);
//      Noise noise = NoiseFactory.makeExplicitNoise(new Function[]{new FourierFunction(1, 10, 1, -1)});

        float elapsedTime = .001f;
        int steps = 1000;
        float[] output = new float[steps];
        for (int i = 0; i < steps; i++) {
            output[i] = noise.getValue(i*elapsedTime, (i+1)*elapsedTime, 1);
        }

        Plotter.plot(output, "noise");
    }
View Full Code Here

TOP

Related Classes of ca.nengo.model.Noise

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.