matrix vector multiplication complex number

10 ビュー (過去 30 日間)
Sylvain Rousseau
Sylvain Rousseau 2019 年 6 月 13 日
コメント済み: Sylvain Rousseau 2019 年 6 月 13 日
Hi,
A complex matrix - vector mutiplication yields to a wrong result.
Heer is the code :
M = [ 1 complex(1,1) ; complex(0,-1) 1 ; 2 0; -1 3]
b = [ 2 complex(1,-1)]';
y=M*b
The outcome obtaind manually is : [ 4 1-3*i 4 1-3*i]
The matlab result (which is wrong) : [ 2+2*i 1-1*i 4 1+3*i]
May I ask you some hints please ?
Regards
Sylvain

採用された回答

Torsten
Torsten 2019 年 6 月 13 日
b = [ 2 ,complex(1,-1)].'
instead of
b = [ 2 ,complex(1,-1)]'
  3 件のコメント
Torsten
Torsten 2019 年 6 月 13 日
b = [ 2 ,complex(1,-1)].'
means that you take the transpose of the vector which gives
b = [2; complex(1,-1)]
b = [ 2 ,complex(1,-1)]'
means that you take the conjugate transpose of the vector which gives
b = [2; complex(1,1)]
Sylvain Rousseau
Sylvain Rousseau 2019 年 6 月 13 日
Many thanks Torsten.
Here is the corresponding doc link : https://fr.mathworks.com/help/matlab/ref/ctranspose.html

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

製品


リリース

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by