フィルターのクリア

solve 2 unknowns using one complex equation

1 回表示 (過去 30 日間)
raymond
raymond 2012 年 6 月 4 日
usually, to solve 2 unknowns, it require at least 2 or more equations. but if the equation is complex, then one equation is sufficient since can compare the real and imaginary part. for example
3+2i = (x+2y+1)+(2x-y-3)i
if want to solve for x and y a simple solve function as shown can be written.
T=3+2i;
syms x y;
P=-real(T)+ (x+2*y+1);
Q=-imag(T)+ (2*x-y-3);
R=solve(P,Q);
X=R.x
Y=R.y
I am now trying to tackle a much more complex equation that involves x and y. and its near impossible to separate the terms into real and imaginary part.
so i'm hoping to do something like this
syms x y;
P=-1*real(T)+ real(%a complicated eq relating x&y%);
Q=-1*imag(T)+ imag(%a complicated eq relating x&y%);
R=solve(P,Q);
but i keep getting error. i think the syntax is incorrect. is there a way to get this working? please share your thoughts one this.
any suggestions are highly appreciated.
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 6 月 4 日
What error message do you get?

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

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by