声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 856|回复: 1

[编程技巧] 菜鸟提问复数问题

[复制链接]
发表于 2009-4-26 20:59 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
>> 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.
请各位大侠看看为什么错了,怎么改?谢谢!
回复
分享到:

使用道具 举报

发表于 2009-4-26 22:19 | 显示全部楼层
y=imag(x)-i*real(x)

评分

1

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-22 15:39 , Processed in 0.069474 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表