Simplifying numbers in symbolic function
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
David H
el 30 de Abr. de 2014
Comentada: Kyle Langford
el 18 de Feb. de 2022
Upon substituting into a symbolic expression I get very long analytic expressions for numbers, e.g. (2^(1/2)*(3^(1/2)*pi*(5^(1/2)/4 - 1/4)*(1/120000 + i/6000000)t + .... is there any way to simplify these numbers down to a single double precision complex number in the symbolic expression to make for easier viewing? I can't just use double (expression) as it still have a symbolic variable.
Many thanks.
David
0 comentarios
Respuesta aceptada
Mischa Kim
el 30 de Abr. de 2014
Editada: Mischa Kim
el 30 de Abr. de 2014
David, have you tried vpa(expr)?
syms x t
x = 2^(1/2)*3^(1/2)*pi*(5^(1/2)/4 - 1/4)*(1/120000 + i/6000000)*t;
vpa(x,10) % you can adjust the number of significant digits
ans =
t*(0.00001981648468 + 0.0000003963296937*i)
3 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!