MATLAB output is a bunch of numbers with operators not the exact number
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fatemeh Salar
am 20 Jun. 2022
Kommentiert: Fatemeh Salar
am 20 Jun. 2022
Hi,
When i ask MATLAB to solve a problem using syms and det , in output section it showes as series on formulas that needed to be calulated and not the exact value. How can I ask matlab to show the exavt number and not numers with operators ? for example instead of (25/6 - (5*13^(1/2))/6)^(1/2) shows 1.078 in commant window
A =
(25/6 - (5*13^(1/2))/6)^(1/2)
((5*13^(1/2))/6 + 25/6)^(1/2)
-(25/6 - (5*13^(1/2))/6)^(1/2)
-((5*13^(1/2))/6 + 25/6)^(1/2)
while it should be :
1.0780
2.6779
-1.0780
-2.6779
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
DGM
am 20 Jun. 2022
To be pedantic, those expressions are the exact result. The decimal values are an approximation.
That said, you should be able to use double() to convert the symbolic expressions to numeric.
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!