function [JV] = CalcJV(Wvl,BinWidth,FluxSingle,XSQY,iStartWvl,iEndWvl);

[nRxn,nWvl] = size(XSQY); 
JV = zeros(1,nRxn);
for iRxn = 1:nRxn

    JvTemp = 0;
    
    
    %First bin
    iWvl = iStartWvl;
    JvTemp = XSQY(iRxn,iWvl)*FluxSingle(iWvl)*BinWidth(iWvl);
    
    %Middle Wvl
    for iWvl = iStartWvl+1:iEndWvl-1
        JvTemp = JvTemp + XSQY(iRxn,iWvl)*FluxSingle(iWvl)*BinWidth(iWvl);
    end
    
    %LastWvl
    
    iWvl = iEndWvl;
    JV(iRxn) = JvTemp + XSQY(iRxn,iWvl)*FluxSingle(iWvl)*BinWidth(iWvl);
   
end