Info

This question is closed. Reopen it to edit or answer.

I am having a tad of difficulty with a MUPad error which I do not really understand. In the trapezoidal integration portion, my purpose is to integrate f within the interval I and place the corresponding values in Approx. I should appreciate help.

1 view (last 30 days)
% Simplistic analysis of the filling factor
zeta=48.8; f_col=erfc(1.69/sqrt(2)*7); C=24.466*exp((-.114*6)+(.00132822*36)); Q_HII=zeros(1,1100); Apprx=ones(1,1100);
% trapezoidal methodology of integration for i=0:1099; f='(z+1)^(-2.5)*exp(-.26*(C/10)*(z+1))^(1.5)'; I=[i 1100]; m=100; x=I(1):(I(2)-I(1))/(m-1):I(2); for j=1:1:length(x) y=subs(f,x); end
Apprx(1,i+1) = trapz(x,y);
end
%calculating the filling factor z=0:1099; Q_HII=zeta*f_col*1.5*exp(.26*(C/10)*(z+1).^(1.5)).*Apprx;
plot(0:1100, Q_HII)

Answers (0)

Community Treasure Hunt

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

Start Hunting!