swe=0.6803:0.001209:0.8 %swe-为出口端饱和度,范围为0.6803-0.8,有100个值
f=@(x)(7.74+1.2709./(3.5459*x.^4-6.4131*x.^3+5.5441*x.^2-4.1115*x+1.5713))/(1-(62.3224*x.^4-156.3326*x.^3+138.9387*x.^2-49.2614*x+6.0063));
%f为待积分的函数句柄
for j=1:60
t(j)=548.19*quad(f,0.6791,swe(j));
end
%对swe中1到60个数据(共有100个数)分别积分,结果存在t中
结果出错:
??? Attempted to access y(7); index out of bounds because numel(y)=1.