>> 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.
请各位大侠看看为什么错了,怎么改?谢谢!