Format result in Live Script Editor
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Didier FRADET
el 24 de Sept. de 2019
Respondida: Sahithi Kanumarlapudi
el 27 de Sept. de 2019
Hello,
Is it possible in Live Script Editor to format result with symbolic variable ?
For example, the result of x = sym(pi/6); cos(x) is :
ans =
And with the code x = sym(pi/6); fprintf('cos(%s) = %s', x, cos(x)), the result is :
cos(pi/6) = 3^(1/2)/2
I would like to have :
Thanks
0 comentarios
Respuestas (1)
Sahithi Kanumarlapudi
el 27 de Sept. de 2019
There might not be a way if ‘x’ value changes . But if ‘x’ value is fixed you can get the desired result with the help of ‘latex()’ and ‘sym’ functions.
Here are the links for the above mentioned functions.
0 comentarios
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!