clear all, clcT1=50+273.15; %%
T2=127+273.15; %%k
Fao=2.5; %%mol/min
P=10; %%atm
k1=10^-4; %%min^-1
R=8.314; %j/k*mol
R1=8.206*10^-5; %%atm*m^3/K*mol
E=85*1000; %%j/mol
k2=k1*exp(E/R*(1/T1-1/T2)); %%min^-1cao=P/(T2*R1); %%mol/m^3
ep=2+1-1;xf=.90;fun=@(x) Fao/(cao*k2)*(1+ep*x)/(1-x);vol=integral(fun,0,xf)Error using integralCalc/finalInputChecks (line 526)Output of the function must be the same size as the input. If FUN is an array-valued integrand, set the 'ArrayValued' option totrue.Error in integralCalc/iterateScalarValued (line 315) finalInputChecks(x,fx);Error in integralCalc/vadapt (line 132) [q,errbnd] = iterateScalarValued(u,tinterval,pathlen);Error in integralCalc (line 75) [q,errbnd] = vadapt(@AtoBInvTransform,interval);Error in integral (line 88)Q = integralCalc(fun,a,b,opstruct);Error in Jallohw5p7a (line 15)vol=integral(fun,0,xf)
I cant seem to integrate this function.
Best Answer