How to set up Paris Law Integral

22 visualizaciones (últimos 30 días)
Kristine
Kristine el 24 de Jul. de 2022
Respondida: Star Strider el 24 de Jul. de 2022
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);

Respuesta aceptada

Star Strider
Star Strider el 24 de Jul. de 2022
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
.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by