フィルターのクリア

Rearrange symbolic variables in equation

3 ビュー (過去 30 日間)
jun wei
jun wei 2022 年 12 月 20 日
コメント済み: jun wei 2022 年 12 月 20 日
Suppose i have an equation a=b*(c-3) and i want to find a/b which is equal to (c-3). How do i code it. P.S I have tried the solve function
eqn = a == b*(c-3);
S = solve(eqn, a/b)
but the result is
S =
struct with fields:
b: [0×1 sym]
c: [0×1 sym]

採用された回答

Walter Roberson
Walter Roberson 2022 年 12 月 20 日
syms aoverb
S = solve(subs(eqn, a, aoverb*b), aoverb)

その他の回答 (1 件)

VBBV
VBBV 2022 年 12 月 20 日
編集済み: VBBV 2022 年 12 月 20 日
syms a b c ;
eqn = a/b == (c-3);
S = solve(eqn,[ a,b,c])
  3 件のコメント
VBBV
VBBV 2022 年 12 月 20 日
syms a b c ;
eqn = a/b == (c-3);
S = solve(eqn,[a,b])
S = struct with fields:
a: c - 3 b: 1
lhs(eqn) == S.a % do you mean like this ?
ans = 
jun wei
jun wei 2022 年 12 月 20 日
uhmm not exactly. For instant if a much complicated equation say a+y^2+3x=b*(2x+c) etc and i want to find a/b in terms of those symbolic variables.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by