How to display square root symbol instead of decimal.

58 Ansichten (letzte 30 Tage)
sunyi
sunyi am 31 Jan. 2023
Beantwortet: pepe am 11 Sep. 2025
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 31 Jan. 2023
sqrt(sym(5))
ans = 
This requires the Symbolic Toolbox.
Also, display of the square root symbol itself instead of 5^(1/2) requires that you are using Livescript

Weitere Antworten (1)

pepe
pepe am 11 Sep. 2025
I believe this suits your purpose
syms x
expand((5+i*sqrt(3)*x)^3)
ans = 
پویا پاکاریان
Pooya Pakarian

Community Treasure Hunt

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

Start Hunting!

Translated by