Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

transpose - What's the difference between two way to input Matlab Complex Matrices

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.

Here's the first input:

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

The output is like this:

I =

   1.0e+02 *

  -0.7063 - 1.2723i
  -1.1030 + 1.6109i

Here's the second input:

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...