Complex
Usage
• Complex 是用于复数的头。
Notes
• 可以用 x + I y的形式输入一个复数。 • _Complex 用于表示一个模式中的复数。 • 可以使用 Re 和 Im 得到Complex数的实、虚部。
Further Examples
The number x is only approximately real.
In[1]:=
|
Out[1]=
|
In[2]:=
|
Out[2]=
|
Chop gets rid of the small imaginary part.
In[3]:=
|
Out[3]=
|
In[4]:=
|
Out[4]=
|
In[5]:=
|
This defines a rule to convert a complex number into a list made up of its real and imaginary parts.
In[6]:=
|
You can apply the rule to all the elements of a list.
In[7]:=
|
Out[7]=
|
In[8]:=
|
|