imaginary -> Matrix
[permalink][rdoc][edit]imag -> Matrix
-
行列の虚部を返します。
require 'matrix' Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] # => 1+2i i 0 # 1 2 3 Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary # => 2i i 0 # 0 0 0
imaginary -> Matrix
[permalink][rdoc][edit]imag -> Matrix
行列の虚部を返します。
require 'matrix'
Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
# => 1+2i i 0
# 1 2 3
Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary
# => 2i i 0
# 0 0 0