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
.
  2 件のコメント
Jorge Arriagada
Jorge Arriagada 2022 年 1 月 13 日
This is the way
Abu Zar
Abu Zar 2023 年 2 月 14 日
Hello if we required more simple?please.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion 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