Borrar filtros
Borrar filtros

format of output in command window

1 visualización (últimos 30 días)
M Gokul
M Gokul el 1 de Jun. de 2016
Comentada: M Gokul el 2 de Jun. de 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

Respuesta aceptada

Ahmed Rashid
Ahmed Rashid el 2 de Jun. de 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 comentarios
Ahmed Rashid
Ahmed Rashid el 2 de Jun. de 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;
M Gokul
M Gokul el 2 de Jun. de 2016
thank you I found out that. Vpa has to be used wen using symbolic var thanks very much

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by