How to vectorize integral function in a code?

조회 수: 18 (최근 30일)
Priya Khot
Priya Khot 2017년 2월 21일
syms r syms p fun1=@(r)(r.^((1-bta)/alpha)/pi*alpha).*exp(-r.^(1/alpha)).*(r*sin(pi*(1-bta))-z*sin(pi*(1-bta+alpha)))/((r.^2-2*r*z*cos(pi*alpha)+z.^2)); % w=r*(eps^(1/alpha))*sin(r/alpha)+r*(1+(1-bta)/alpha);
fun2=@(p)((eps^(1+(1-bta)/alpha))/(2*pi*alpha))*((exp((eps^(1/alpha))*cos(p/alpha)).*... (cos(p*(eps^(1/alpha))*sin(p/alpha)+p*(1+(1-bta)/alpha))+1i*sin(p*(eps^(1/alpha))*sin(p/alpha)+p*(1+(1-bta)/alpha)))))/(eps*exp(1i*p)-z); if (bta<=1) sm=integral(fun1,0,ro,'ArrayValued',true); else sm=(integral(fun1,1,ro,'ArrayValued',true)+integral(fun2,(-alpha*pi),(alpha*pi),'ArrayValued',true)); end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by