How to arrange equation variable on right and left hand side?

22 ビュー (過去 30 日間)
Shobhit  Agarwal
Shobhit Agarwal 2017 年 1 月 22 日
編集済み: Karan Gill 2017 年 10 月 17 日
A*k*cos(phi - t*w) + A*c*w*sin(phi - t*w) - A*m*w^2*cos(phi - t*w) == p*cos(t*w)
I have this equation.
I want to get this equation as;
A = .....,
that is arranging all variables and functions to right and A to left.
How can I do it?
  1 件のコメント
Roger Stafford
Roger Stafford 2017 年 1 月 22 日
This is simple algebra. Factor out A from each of the three terms on the left side and then divide both sides by the remaining factor. That leaves A by itself on the left side.

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

回答 (1 件)

Karan Gill
Karan Gill 2017 年 5 月 9 日
編集済み: Karan Gill 2017 年 10 月 17 日
Starting R2017a, use the "isolate" function: https://www.mathworks.com/help/symbolic/isolate.html
Also see the "lhs" and "rhs" functions:
Answering the question using these functions:
>> syms A k phi t w c m p
>> eqn = A*k*cos(phi - t*w) + A*c*w*sin(phi - t*w) - A*m*w^2*cos(phi - t*w) == p*cos(t*w)
eqn =
A*k*cos(phi - t*w) + A*c*w*sin(phi - t*w) - A*m*w^2*cos(phi - t*w) == p*cos(t*w)
>> eqn = isolate(eqn,A)
eqn =
A == (p*cos(t*w))/(k*cos(phi - t*w) - m*w^2*cos(phi - t*w) + c*w*sin(phi - t*w))
>> lhs(eqn)
ans =
A
>> rhs(eqn)
ans =
(p*cos(t*w))/(k*cos(phi - t*w) - m*w^2*cos(phi - t*w) + c*w*sin(phi - t*w)

カテゴリ

Help Center および File ExchangeFormula Manipulation and Simplification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by