Complex.Phase プロパティ

定義

複素数のフェーズを取得します。Gets the phase of a complex number.

public:
 property double Phase { double get(); };
public double Phase { get; }
member this.Phase : double
Public ReadOnly Property Phase As Double

プロパティ値

複素数のフェーズ (ラジアン単位)。The phase of a complex number, in radians.

次の例ではFromPolarCoordinates 、メソッドを使用して、極座標に基づいて複素数をインスタンス化し、そのMagnitudeプロパティPhaseとプロパティの値を表示します。The following example uses the FromPolarCoordinates method to instantiate a complex number based on its polar coordinates, and then displays the value of its Magnitude and Phase properties.

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex c1 = Complex.FromPolarCoordinates(10, 45 * Math.PI / 180);
      Console.WriteLine("{0}:", c1);
      Console.WriteLine("   Magnitude: {0}", Complex.Abs(c1));
      Console.WriteLine("   Phase:     {0} radians", c1.Phase);
      Console.WriteLine("   Phase      {0} degrees", c1.Phase * 180/Math.PI);
      Console.WriteLine("   Atan(b/a): {0}", Math.Atan(c1.Imaginary/c1.Real));
   }
}
// The example displays the following output:
//       (7.07106781186548, 7.07106781186547):
//          Magnitude: 10
//          Phase:     0.785398163397448 radians
//          Phase      45 degrees
//          Atan(b/a): 0.785398163397448
Imports System.Numerics

Module Example
   Public Sub Main()
      Dim c1 As Complex = Complex.FromPolarCoordinates(10, 45 * Math.Pi / 180)
      Console.WriteLine("{0}:", c1)
      Console.WriteLine("   Magnitude: {0}", Complex.Abs(c1))
      Console.WriteLine("   Phase:     {0} radians", c1.Phase)
      Console.WriteLine("   Phase      {0} degrees", c1.Phase * 180/Math.Pi)
      Console.WriteLine("   Atan(b/a): {0}", Math.Atan(c1.Imaginary/c1.Real))
   End Sub
End Module
' The example displays the following output:
'       (7.07106781186548, 7.07106781186547):
'          Magnitude: 10
'          Phase:     0.785398163397448 radians
'          Phase      45 degrees
'          Atan(b/a): 0.785398163397448

注釈

複素数 a + bi の場合、フェーズは (b, a Math.Atan2) として計算されます。For a complex number a + bi, the phase is computed as Math.Atan2(b, a).

複素数は、複素平面または極座標座標によって、デカルト座標によって識別できます。You can identify a complex number by its Cartesian coordinates on the complex plane or by its polar coordinates. 複素数の位相 (引数) は、原点 (x 軸と y 軸の交差部分) から、複素数が表す点までの直線の実際の軸の角度を表しています (引数)。The phase (argument) of a complex number is the angle to the real axis of a line drawn from the point of origin (the intersection of the x-axis and the y-axis) to the point represented by the complex number. ( Magnitudeプロパティで表される) の大きさは、原点から複素数で表される地点までの距離です。The magnitude (represented by the Magnitude property) is the distance from the point of origin to the point that is represented by the complex number.

メソッドをFromPolarCoordinates呼び出すことにより、デカルト座標ではなく極座標に基づいて複素数をインスタンス化できます。You can instantiate a complex number based on its polar coordinates instead of its Cartesian coordinates by calling the FromPolarCoordinates method.

フェーズをラジアンから度に変換するには、180/Math.PIで乗算します。To convert the phase from radians to degrees, multiply it by 180/Math.PI.

適用対象

こちらもご覧ください