フィルターのクリア

how to extract y as a function of x

4 ビュー (過去 30 日間)
Robert Jones
Robert Jones 2022 年 12 月 14 日
コメント済み: Star Strider 2022 年 12 月 14 日
Hello,
I am trying to extract the y as a function of x in the expression below, using the symbolic toolbox.
Here is the the expression (the generalized formula of an offsetted, rotated ellipse).
(a^2*sin(tr)^2+b^2*cos(tr)^2)*(x-x0)^2+2*(b^2-a^2)*sin(tr)*cos(tr)*(x-x0)*(y-y0)+(a^2+cos(tr)^2+b^2*sin(tr))*(y-y0)^2==a^2*b^2;
I need to express y as a function of x. I undersand there might be more than one solutions.
I tried without success:
syms x y a b x0 y0 tr
fun=solve(y,x)
Apparently I do not know how to use the symbolic tollbox correctly
Help would be appreciated
Thank you

採用された回答

Star Strider
Star Strider 2022 年 12 月 14 日
Try something like this —
syms x y a b x0 y0 tr
sympref('AbbreviateOutput',false);
Eqn = (a^2*sin(tr)^2+b^2*cos(tr)^2)*(x-x0)^2+2*(b^2-a^2)*sin(tr)*cos(tr)*(x-x0)*(y-y0)+(a^2+cos(tr)^2+b^2*sin(tr))*(y-y0)^2==a^2*b^2;
Eqn = simplify(Eqn, 1000)
Eqn = 
fun = simplify(solve(Eqn,y),1000)
fun = 
Eqn = isolate(Eqn, y)
Eqn = 
.
  2 件のコメント
Robert Jones
Robert Jones 2022 年 12 月 14 日
移動済み: John D'Errico 2022 年 12 月 14 日
Great, Thank you. I will
Star Strider
Star Strider 2022 年 12 月 14 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by