format of output in command window
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
M Gokul
am 1 Jun. 2016
Kommentiert: M Gokul
am 2 Jun. 2016
I am getting output of simple math equations
36.0801*1.1462-181.04*(-.13341-.05423*K))/36.0801
(53973921897849552896*K)/198352447406604296875 + 720263206506893453689/396704894813208593750.
i am not getting the decimal form!
i need the answer in decimal form so as to perform more calculations
1 Kommentar
Akzeptierte Antwort
Ahmed Rashid
am 2 Jun. 2016
You can use
syms K
A = (36.0801*1.1462-181.04*(-.13341-.05423*K))/36.0801;
d = 5; % decimal accuracy;
vpa(A,d)
3 Kommentare
Ahmed Rashid
am 2 Jun. 2016
If you want to evaluate the expression you can use
syms K
A = (36.0801*1.1462-181.04*(-.13341-.05423*K))/36.0801;
subs(A, K, 1) % K = 1;
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Conversion Between Symbolic and Numeric 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!