How to set up Paris Law Integral

21 ビュー (過去 30 日間)
Kristine
Kristine 2022 年 7 月 24 日
回答済み: Star Strider 2022 年 7 月 24 日
I am trying to set up an integral for the Paris law equation. My integral should go from 0.1 to 1.1365. I am using a polynomial function for K. I am getting lots of error. It has been a while since I have tried to set up an integral, and I tried to use the format below. Thank you in advance for help!
C=1.6*10^-9;
Alpha=2.6;
xmin=0.1;
xmax=1.1365;
K=40000*sqrt(pi*x)*[1.1216+6.5200*((x/10)^2)-12.3877*((x/10)^4)+89.0554*((x/10)^6)-188.6080*((x/10)^8)+207.3870*((x/10)^10)-32.0524*((x/10)^12)];
fun= @(x) (C^-1)*(K)^-Alpha;
Nf = integral(fun,xmin,xmax);

採用された回答

Star Strider
Star Strider 2022 年 7 月 24 日
Since ‘K’ is a funciton of ‘x’ it needs to be created as an anonymous function, and for whatever reason, the integrand ‘fun’ creates an array, so use the 'ArrayValued' name-value pair —
C=1.6*10^-9;
Alpha=2.6;
xmin=0.1;
xmax=1.1365;
K= @(x) 40000*sqrt(pi*x)*[1.1216+6.5200*((x/10)^2)-12.3877*((x/10)^4)+89.0554*((x/10)^6)-188.6080*((x/10)^8)+207.3870*((x/10)^10)-32.0524*((x/10)^12)];
fun= @(x) (1/C)*(K(x))^-Alpha;
Nf = integral(fun,xmin,xmax, 'ArrayValued',1)
Nf = 3.7898e-04
.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by