Cannot calculate integral function

7 ビュー (過去 30 日間)
lvenG
lvenG 2021 年 9 月 20 日
コメント済み: Star Strider 2021 年 9 月 20 日
Help on this case. I am integrating a certain function with known upper and lower limits as per below but when I run it, the command window still shows an integral function and not a numerical value. Thanks and hoping for some help.
syms y
V = (2/3).*pi.*3.4.^3 .*(1-exp((-4.*100./300)*((1./y.^4)-(1./y.^2))));
B = int(V, y, 0, 10000);

採用された回答

Star Strider
Star Strider 2021 年 9 月 20 日
If you want a numeric result, use vpaintegral (introduced in R2016b) instead of int. Not all expressions have analytic integrals.
syms y
V = (2/3).*pi.*3.4.^3 .*(1-exp((-4.*100./300)*((1./y.^4)-(1./y.^2))));
B = vpaintegral(V, y, 0, 10000)
B = 
.
  2 件のコメント
lvenG
lvenG 2021 年 9 月 20 日
thank you for this! :)
Star Strider
Star Strider 2021 年 9 月 20 日
As always, my pleasure!
.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by