两种输入Matlab复杂矩阵的方法有什么区别 [英] What's the difference between two way to input Matlab Complex Matrices

查看:172
本文介绍了两种输入Matlab复杂矩阵的方法有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是在Matlab中输入命令的两种方法.我认为它们之间没有任何区别.但是,结果确实不同.所以我想知道在这种情况下我错过了什么.

Here's two ways to enter the command in Matlab. I don't think there's any difference between them. However, the result is really different. So I wonder what's I missed in this situation.

这是第一个输入:

>> A = [(-0.025+0.01i) -0.025;
   3 (1-2i)];
>> B = [(5.7955+1.5529i) 0]';
>> I=inv(A)*B

输出如下:

I =

   1.0e+02 *

  -0.7063 - 1.2723i
  -1.1030 + 1.6109i

这是第二个输入:

>> A = [(-0.025+0.01i) -0.025;3 (1-2i)];
>> B = [(5.7955+1.5529i);0];
>> I=inv(A)*B

Matlab给出以下结果:

And the Matlab give me the result below:

I =

           2.44764705882354 -      145.499411764706i
          -176.067882352941 +      84.3624705882353i

我对这种情况感到非常困惑.如果您知道什么,请告诉我.谢谢.

I'm really confused about this situation. If you know anything please let me know about it. Thanks.

推荐答案

使用实际上是逐元素转置的B = [(5.7955+1.5529i) 0].'而不是共轭转置的B = [(5.7955+1.5529i) 0]'.

Use B = [(5.7955+1.5529i) 0].' which is actually element-wise transpose and not B = [(5.7955+1.5529i) 0]' which is conjugate transpose.

还可以使用显式调用来转置命令-B = transpose([(5.7955+1.5529i) 0])

One can also use an explicit call to transpose command - B = transpose([(5.7955+1.5529i) 0])

这篇关于两种输入Matlab复杂矩阵的方法有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆