0

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'.

IFC未在 for 循环中定义,并且代码在Aci =语句处停止(因为IFC未定义)。有没有办法IFC在循环中定义?

4

1 回答 1

3

您应该在循环之前添加以下初始化:

 IFC=zeros(length(em_abs),length(ex_abs));
于 2012-10-20T20:32:55.827 回答