필터 지우기
필터 지우기

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 CenterFile Exchange에서 Numerical 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