vpasolve only shows 5 significant figures
7 ビュー (過去 30 日間)
古いコメントを表示
Hello,
MATLAB help shows the following command should produce the result shown below
syms x
S = vpasolve(sin(x) == 1/2, x)
but on my machine it produces the following result
S = 0.5236
Similarly the command below should produce the result shown below
vpa(pi,10)
but on my machine it produces the following result
ans = 3.1416
Why am I only getting 4 decimal places of precision? I've tried the digits(10) command but it doesn't help.
Any help greatly appreciated.
Thanks!
0 件のコメント
回答 (1 件)
Steven Lord
2025 年 4 月 1 日
移動済み: Walter Roberson
2025 年 4 月 1 日
Let's make sure you're using the functions from Symbolic Math Toolbox. What do these commands display?
which -all syms
which -all vpasolve
which -all vpa
Also what are your symbolic preferences? In particular, what is the FloatingPointOutput preference value?
sympref
3 件のコメント
Walter Roberson
2025 年 4 月 1 日
Heh. I knew the cause of the problem from the Title to the question alone ;-)
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!