Пример #1
0
        public static ComplexCar Pol2Car(ComplexPol complexPol)
        {
            ComplexCar complexCar;

            complexCar.real = complexPol.mod * Math.Cos(complexPol.ang);
            complexCar.imag = complexPol.mod * Math.Sin(complexPol.ang);

            return(complexCar);
        }
Пример #2
0
        public static ComplexCar Sqrt(ComplexCar complexCar)
        {
            ComplexPol complexPol = Car2Pol(complexCar);
            ComplexCar complex;

            complex.real = Math.Sqrt(complexPol.mod) * Math.Cos(complexPol.ang / 2);
            complex.imag = Math.Sqrt(complexPol.mod) * Math.Sin(complexPol.ang / 2);

            return(complex);
        }
Пример #3
0
        public static double[] DGD(JonesMatCar J1, JonesMatCar J2, double w1, double w2)
        {
            JonesMatCar J1Inv = CMath.Inverse(J1);

            JonesMatCar J2_J1Inv = J2 * J1Inv;

            ComplexCar[] complexCars = CMath.Eigenvalues(J2_J1Inv);

            ComplexPol[] complexPols = new ComplexPol[2];

            complexPols[0] = CMath.Car2Pol(complexCars[0]);
            complexPols[1] = CMath.Car2Pol(complexCars[1]);

            double Ang = complexPols[0].ang - complexPols[1].ang;

            double f1 = Wavelength2Frequency(w1);
            double f2 = Wavelength2Frequency(w2);

            double[] DGD_WL = { CMath.Abs(Ang / (f1 - f2)), (w1 + w2) / 2 };

            return(DGD_WL);
        }
Пример #4
0
 public static void Print(ComplexPol complexPol)
 {
     Console.Write(complexPol.mod + " |_" + complexPol.ang);
 }