获取matlab显示平方根(即2 ^(1/2)而不是1.414)(Get matlab to show square roots (i.e. 2^(1/2) instead of 1.414))
我有一些简单的方程式,我想通过matlab管道。 但我希望得到确切的答案,因为这些值预计将在以后使用和简化。
现在,Matlab将sqrt(2.0)显示为1.1414而不是像我想要的那样2^(1/2) 。
我尝试打开format rat但这很危险,因为它显示sqrt(2)为1393/985没有任何警告。
有“象征性的数学”,但似乎有点矫枉过正。
我想要的是2 + sqrt(50)将返回类似2 + 5 * (2)^(1/2) ,甚至我5岁的CASIO计算器都可以做到这一点!
那么我该怎样做才能在matlab中将2 + sqrt(50)评估为2 + 5 * (2)^(1/2) ?
I have a few simple equations that I want to pipe through matlab. But I would like to get exact answers, because these values are expected to be used and simplified later on.
Right now Matlab shows sqrt(2.0) as 1.1414 instead of something like 2^(1/2) as I would like.
I tried turning on format rat but this is dangerous becasue it shows sqrt(2) as 1393/985 without any sort of warning.
There is "symbolic mat