Display symbolic expressions as rational.

23 ビュー (過去 30 日間)
Agustín Rico
Agustín Rico 2021 年 2 月 2 日
コメント済み: Robert Ukrow 2022 年 1 月 26 日
How can I display symbolic expressions as rationals? Functions like sympref or vpa allows to display in decimal format, but doesn't provide a way to display symbolic expressions as rationals.
For example:
syms x
ans =
Instead of that output I desire the rational expression (or similar):
  1 件のコメント
James Tursa
James Tursa 2021 年 2 月 2 日
That's what I get:
>> syms x
ans =
Do you have something set in preferences that is forcing the decimal output?



madhan ravi
madhan ravi 2021 年 2 月 2 日
編集済み: madhan ravi 2021 年 2 月 2 日
syms x
ans = 
ans = 
  3 件のコメント
Diaa 2021 年 12 月 18 日
Thanks to you for this answer, and special thanks to google algorithm for bringing me here without wasting my whole day.
Robert Ukrow
Robert Ukrow 2022 年 1 月 26 日
Had the same problem and it worked..thanks !


その他の回答 (0 件)


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

Community Treasure Hunt

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

Start Hunting!

Translated by