function [EFC, EFCi, EFC_ob] = loadEFCfromVehicle(matpath,time)


% EFC from vehicle
c=load(matpath{:},'CBIT');
EFC_ob = c.CBIT.empericalClassifierFaultDetected;

% interp to match fixed timegrid
EFC = zeros(size(time)); %interp1(EFC_ob.time,double(EFC_ob.value),time,'nearest');
flag = EFC_ob.value~=0 & ~isnan(EFC_ob.value);
valEFC_ob = EFC_ob.value(flag);

indEFC_ob = closest(EFC_ob.time(flag),time);
EFC(indEFC_ob)=valEFC_ob;

EFCi = indEFC_ob;

end
