Do the sqrt(number in sym form) give a result with real number like 2.3456.

조회 수: 2 (최근 30일)
Mohammed Amain
Mohammed Amain 2016년 9월 4일
답변: Star Strider 2016년 9월 4일
I use very large number 2^1024 and more. I define my numbers and variables by sym form like sym(K). The problem when I use sqrt function with number or variables of sym form. As an example if I want to sqrt(K) and K is sym type and it 's value is 205 the answer I get 205^1/2 instead of 14.317821063276353154439601231034 which I need the last value in my calculation. Is there a solution to a this problem

답변 (1개)

Star Strider
Star Strider 2016년 9월 4일
Yes, there is.
Use the vpa function:
x = sym(sqrt(205))
xn = vpa(x)
xn =
14.317821063276353154439601231034

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by