How to display square root symbol instead of decimal.

200 ビュー (過去 30 日間)
sunyi
sunyi 2023 年 1 月 31 日
回答済み: Walter Roberson 2023 年 1 月 31 日
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?
  1 件のコメント
KSSV
KSSV 2023 年 1 月 31 日
Where you want to display it?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2023 年 1 月 31 日
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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumbers and Precision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by