sym(1/3) bug?

1 次查看(过去 30 天)
Andrew Dabrowski
Andrew Dabrowski 2021-2-13
评论: Adam Danz 2021-2-13
But when I try running this I get
Is this a bug or am I doing something wrong?

采纳的回答

Adam Danz
Adam Danz 2021-2-13
编辑:Adam Danz 2021-2-13
Check your symbolic preferences.
sympref
ans = struct with fields:
FourierParameters: [1×2 sym] HeavisideAtOrigin: [1×1 sym] AbbreviateOutput: 1 TypesetOutput: 1 FloatingPointOutput: 0 PolynomialDisplayStyle: 'default' MatrixWithSquareBrackets: 0
If the FloatingPointOutput if true change it to false
sympref('FloatingPointOutput',true);
sym(1/3)
ans = 
0.3333
sympref('FloatingPointOutput',false);
sym(1/3)
ans = 
  1 个评论
Adam Danz
Adam Danz 2021-2-13
Andrew Dabrowski's answer moved here as comment
Ah thanks, that was it!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numbers and Precision 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by