Package JSci.maths

Examples of JSci.maths.Complex.multiply()


        Complex     zfm = Complex.ONE;
        Complex     zim = Complex.ONE;
        for (int m=0; m<N; m++)    {

            kf = zfm.multiply(c);
            ki = zim.multiply(c);
           
            for (int n=m; n<N; n++)    {
                Kf.setElement(m, n, kf);
                Kf.setElement(n, m, kf);
               
View Full Code Here


                kf = kf.multiply(zfm);
                ki = ki.multiply(zim);
            }
           
            zfm = zfm.multiply(zf);
            zim = zim.multiply(zi);
        }
       
        this.szData = N;
        this.cpxZ   = zi;
        this.matKerFwd = Kf;
View Full Code Here

        int     N = this.getDataSize();
       
        Complex cpxSpec;
       
        cpxSpec = vecTrans.getComponent(intFreq);
        vecTrans.setComponent(intFreq, cpxSpec.multiply(cpxA));

        if (intFreq == 0) return;
        cpxSpec = vecTrans.getComponent(N - intFreq);
        vecTrans.setComponent(N - intFreq, cpxSpec.multiply(cpxA));
    }
View Full Code Here

        cpxSpec = vecTrans.getComponent(intFreq);
        vecTrans.setComponent(intFreq, cpxSpec.multiply(cpxA));

        if (intFreq == 0) return;
        cpxSpec = vecTrans.getComponent(N - intFreq);
        vecTrans.setComponent(N - intFreq, cpxSpec.multiply(cpxA));
    }
   
    /**
     * Correct the phasing of the frequency response to simulate that of a
     * linear phase filter.  These filters have constant time delay for
View Full Code Here

            double  cos = Math.cos(iFreq*h);
            double  sin = Math.sin(iFreq*h);

            Complex cpxPhase = new Complex(cos, -sin);
            Complex cpxSpec  = vecTrans.getComponent(iFreq);
            vecTrans.setComponent(iFreq, cpxSpec.multiply(cpxPhase));
        }
    }
   
    /**
     * Check the given discrete function for the proper dimensions.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.