How to display square root symbol instead of decimal.
Mostrar comentarios más antiguos
The number of display format does not include the square, I can only select decimal, rational..., but not square root. When I input sqrt(5) in a matrix and display it, it is transformed to decimal. Can I keep the square root form?
3 comentarios
KSSV
el 31 de En. de 2023
Where you want to display it?
Botlhe
el 10 de Feb. de 2026
Command window
Walter Roberson
el 10 de Feb. de 2026
Editada: Walter Roberson
el 10 de Feb. de 2026
To display at the command line, you would need to be using a matlab version from the last several years, and you would need to fprintf the unicode square root symbol, √ which is U+221A, followed by whatever text. This would prefix the text with the symbol rather than drawing the symbol extending over the text. There is no way to get the symbol extending over the text at the command line.
If you use the symbolic toolbox together with Livescript then it does become possible to display the square root extending over the text... but not at the command line.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!