Help extracting data from solution matrix

4 ビュー (過去 30 日間)
Brian Hoblin
Brian Hoblin 2017 年 2 月 25 日
コメント済み: Star Strider 2017 年 2 月 26 日
I have this simple code here,
if true
A=[1 0 0
0 1i -2i
0 -2i (3+2i)]
C=[-4.5
6
0]
B=[1i
2i
3i]
I=A\C
end
and it gives this answer,
if true
I =
-4.5000 + 0.0000i
5.5385 - 2.3077i
2.7692 + 1.8462i
end
I'd like to apply sqrt((real)^2+(imaginary)^2) and atand(imaginary/real) to the solution vector. Actually, I'm only concerned with row 3 of the solution vector. How would I do that? Thanks for the help.

採用された回答

Star Strider
Star Strider 2017 年 2 月 26 日
MATLAB has two functions that will do exactly what you want:
I = [-4.5000 + 0.0000i
5.5385 - 2.3077i
2.7692 + 1.8462i];
Amplitude = abs(I); % Units: Original Units
Phase = angle(I); % Units: Radians
  2 件のコメント
Brian Hoblin
Brian Hoblin 2017 年 2 月 26 日
Great! that was exactly what I was looking for. Thank you!
Star Strider
Star Strider 2017 年 2 月 26 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by