//求得电场的垂直分量 //调用方法:thisEfield.GetVerticalE(k,l) public Plural GetVerticalE(SpectVector k, SpectVector l) //k为射线传播方向,l为反射中的反射面的法向量或绕射中的与棱平行的向量 { SpectVector n = k.CrossMultiplied(l).GetNormalizationVector(); Plural p = n.DotMultiplied(this); return(p); }
//求得电场的垂直分量 public static Plural GetVerticalE(EField e, SpectVector k, SpectVector l) //k为射线传播方向,l为反射中的反射面的法向量或绕射中的与棱平行的向量 { SpectVector n = SpectVector.VectorCrossMultiply(k, l); Plural p = SpectVector.VectorDotMultiply(e, n); return(p); }
public Object Clone() { Plural newPlural = new Plural(); newPlural.Re = this.R; newPlural.Im = this.I; return(newPlural); }
/// <summary> ///复数与int型数据乘法运算 /// </summary> public static Plural PluralMultiplyDouble(Plural p, double k) { Plural p1 = new Plural(); p1.Re = p.Re * k; p1.Im = p.Im * k; return(p1); }
/// <summary> ///复数开根号运算 /// </summary> public static Plural PluralSqrt(Plural p) { Plural p1 = new Plural(); p1.Re = Math.Sqrt((Math.Sqrt(p.Re * p.Re + p.Im * p.Im) + p.Re) / 2); p1.Im = -Math.Sqrt((Math.Sqrt(p.Re * p.Re + p.Im * p.Im) - p.Re) / 2); return(p1); }
//求得电场的水平分量 //调用方法:thisEfield.GetVerticalE(k,l) public Plural GetHorizonalE(SpectVector k, SpectVector l) { SpectVector n = k.CrossMultiplied(l); //入射面的法向量 SpectVector m = k.CrossMultiplied(n).GetNormalizationVector(); Plural p = m.DotMultiplied(this); return(p); }
//求得电场的水平分量 public static Plural GetHorizonalE(EField e, SpectVector k, SpectVector l) { SpectVector n = SpectVector.VectorCrossMultiply(k, l); //入射面的法向量 SpectVector m = SpectVector.VectorCrossMultiply(k, n); Plural p = SpectVector.VectorDotMultiply(e, m); return(p); }
//复数向量与矢量的点乘运算 //原函数:public static Plural VectorDotMultiply(Efield e, SpectVector l) public Plural DotMultiplied(EField eValue) { Plural p = new Plural(); p.Re = eValue.X.Re * this.a + eValue.Y.Re * this.b + eValue.Z.Re * this.c; p.Im = eValue.X.Im * this.a + eValue.Y.Im * this.b + eValue.Z.Im * this.c; return(p); }
/// <summary> ///复数向量与矢量的点乘运算 /// </summary> public static Plural VectorDotMultiply(EField e, SpectVector l) { Plural p = new Plural(); p.Re = e.X.Re * l.a + e.Y.Re * l.b + e.Z.Re * l.c; p.Im = e.X.Im * l.a + e.Y.Im * l.b + e.Z.Im * l.c; return(p); }
/// <summary> ///复数与矢量的点乘运算 /// </summary> public static EField VectorDotMultiply(Plural p, SpectVector l) { Plural X = new Plural(l.a * p.Re, l.a * p.Im); Plural Y = new Plural(l.b * p.Re, l.b * p.Im); Plural Z = new Plural(l.c * p.Re, l.c * p.Im); EField e = new EField(X, Y, Z); return(e); }
public Plural GetTolEx(List <CalculateModelClasses.Path> RxPaths) { Plural TolEx = new Plural(); foreach (CalculateModelClasses.Path path in RxPaths) { TolEx += path.node[path.node.Count - 1].TotalE.X; } return(TolEx); }
//复数与矢量的点乘运算 // 原函数public static Efield VectorDotMultiply(Plural p, SpectVector l) public EField DotMultiplied(Plural pValue) //this.DotMultiplied(p) { Plural X = new Plural(this.a * pValue.Re, this.a * pValue.Im); Plural Y = new Plural(this.b * pValue.Re, this.b * pValue.Im); Plural Z = new Plural(this.c * pValue.Re, this.c * pValue.Im); EField e = new EField(X, Y, Z); return(e); }
public double frequencyspace; //最小频率间隔 public psd(string WaveformType, double PulseWidth, long CarrierFrequency, double Rolloff, string FrequencyVariation, double StartFrequency, double StopFrequency) //(波形函数,载波频率,最大频率) { input = new Plural[1024]; IO = new Plural[1024]; psddata = new double[1024]; code = new int[1024]; outdata = new Plural[1024]; temp = new Plural[1024]; for (int k = 0; k < N; k++) { input[k] = new Plural(0, 0); IO[k] = new Plural(0, 0); outdata[k] = new Plural(0, 0); temp[k] = new Plural(0, 0); } Wtemp = new Plural(0, 0); if (WaveformType == "Chirp") { if ((FrequencyVariation != "Linear" || FrequencyVariation != "exponential") || (StartFrequency < 0) || (StopFrequency < 0) || (StartFrequency == StopFrequency) || (Rolloff > 1) || (Rolloff < 0)) { throw new Exception("Chrip波形信息错误"); } StartFrequency = StartFrequency * 1000000; StopFrequency = StopFrequency * 1000000; samplingFrequency = (int)Math.Abs(StopFrequency - StartFrequency); } else { carrierFrequency = CarrierFrequency * 1000000; maxFrequency = (int)(1 / PulseWidth); if (maxFrequency > carrierFrequency || PulseWidth > 0.000000143) { throw new Exception("脉冲宽度过大或者过小"); } samplingFrequency = 2 * maxFrequency; } totalpsd = 0; frequencyspace = (float)samplingFrequency / N; GetInPutInformation(WaveformType, PulseWidth, samplingFrequency, Rolloff, FrequencyVariation, StartFrequency, StopFrequency); }
public EField(Plural x, Plural y, Plural z) { X = x; Y = y; Z = z; }
public EField() { X = new Plural(0, 0); Y = new Plural(0, 0); Z = new Plural(0, 0); }