How to collect a fraction in a certain equation?
1 回表示 (過去 30 日間)
古いコメントを表示
Suppose i have this equation :
>> syms a b c d e
>> f=(a/3)+(b/3)+(c/3)+(d/3)+(e/3)
f =
1/3*a+1/3*b+1/3*c+1/3*d+1/3*e
And i need some command to collect
term. And i wish it will displays :
f =
(1/3)*(a+b+c+d+e)
Is it possible to do this? How?
Thanks in advance!
0 件のコメント
採用された回答
Chuguang Pan
2019 年 12 月 12 日
Hi Fahmy.
I try the matlab function factor, but it get the result as following.
syms a b c d e
f=(a/3)+(b/3)+(c/3)+(d/3)+(e/3);
F=factor(f)
F=[1/3,a+b+c+d+e]. maybe exist another method.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!