how to obtain single value answer from numeric expression

조회 수: 2 (최근 30일)
Pk Verma
Pk Verma 2021년 10월 8일
댓글: Abu Zar 2023년 2월 14일
syms x
Ixx=int(x^4*sqrt(1+4*x^2),0,.5
Ixx = 
I want output in single value not as expression for exmple above expression value is 0.0082

채택된 답변

Star Strider
Star Strider 2021년 10월 8일
One option is the vpa function —
syms x
Ixx=int(x^4*sqrt(1+4*x^2),0,.5)
Ixx = 
Ixx = vpa(Ixx)
Ixx = 
0.008166416469837431261269302763286
.another one is double, depending on the desired result —
syms x
Ixx=int(x^4*sqrt(1+4*x^2),0,.5)
Ixx = 
Ixx = double(Ixx)
Ixx = 0.0082
.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by