Bagikan melalui


Complex.Phase Properti

Definisi

Mendapatkan fase bilangan kompleks.

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

Nilai Properti

Fase bilangan kompleks, dalam radian.

Contoh

Contoh berikut menggunakan metode untuk membuat instans FromPolarCoordinates bilangan kompleks berdasarkan koordinat polarnya, lalu menampilkan nilai properti dan Phase miliknyaMagnitude.

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
open System
open System.Numerics

let c1 = Complex.FromPolarCoordinates(10., 45. * Math.PI / 180.)
printfn $"{c1}:"
printfn $"   Magnitude: {Complex.Abs(c1)}"
printfn $"   Phase:     {c1.Phase} radians"
printfn $"   Phase      {c1.Phase * 180. / Math.PI} degrees"
printfn $"   Atan(b/a): {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

Keterangan

Untuk bilangan a + bikompleks , fase dihitung sebagai Atan(b, a).

Anda dapat mengidentifikasi angka kompleks dengan koordinat Kartesiusnya pada bidang kompleks atau dengan koordinat kutubnya. Fase (argumen) dari bilangan kompleks adalah sudut ke sumbu nyata garis yang digambar dari titik asal (persimpangan sumbu x dan sumbu y) ke titik yang diwakili oleh bilangan kompleks. Besaran (diwakili oleh Magnitude properti) adalah jarak dari titik asal ke titik yang diwakili oleh bilangan kompleks.

Anda dapat membuat instans angka kompleks berdasarkan koordinat kutubnya alih-alih koordinat Kartesiusnya dengan memanggil FromPolarCoordinates metode .

Untuk mengonversi fase dari radian ke derajat, kalikan dengan $\frac{180}{\pi}$.

Berlaku untuk

Lihat juga