Matlab代码:
% Performs Inner Filter Calculation using the UV absorbance spectrum.
ex_abs=absint(exabsstart:exinc:exabsend,:);
em_abs=absint(emabsstart:eminc:emabsend,:);
for i=1:length(em_abs)
for j=1:(length(ex_abs))
IFC(i,j)=ex_abs(j)+em_abs(i);
end
end
Aci = A.*10.^(0.5*IFC); %This is the IFC.
Warning: Integer operands are required for colon operator when used as index
Undefined function or variable 'IFC'.
for循环中未定义 IFC
,代码在Aci =
语句处停止(因为IFC
未定义)。有没有办法在循环中定义IFC
?
答案 0 :(得分:3)
您应该在循环之前添加以下初始化:
IFC=zeros(length(em_abs),length(ex_abs));