mengyunkui 发表于 2009-4-26 20:59

菜鸟提问复数问题

>> x=1-2i
x =
   1.0000 - 2.0000i
>> y=2+1i
y =
   2.0000 + 1.0000i
>> real(y)=imag(x)
??? Subscript indices must either be real positive integers or logicals.
>> imag(y)=-real(x)
??? Subscript indices must either be real positive integers or logicals.
请各位大侠看看为什么错了,怎么改?谢谢!

ChaChing 发表于 2009-4-26 22:19

y=imag(x)-i*real(x)
页: [1]
查看完整版本: 菜鸟提问复数问题