Effacer les filtres
Effacer les filtres

how to obtain single value answer from numeric expression

6 vues (au cours des 30 derniers jours)
Pk Verma
Pk Verma le 8 Oct 2021
Commenté : Abu Zar le 14 Fév 2023
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

Réponse acceptée

Star Strider
Star Strider le 8 Oct 2021
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 commentaires
Jorge Arriagada
Jorge Arriagada le 13 Jan 2022
This is the way
Abu Zar
Abu Zar le 14 Fév 2023
Hello if we required more simple?please.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by