function [lidarData,imageData] = loadLidarAndImageData(initTime,finalTime)
initFrame = max(1,floor(initTime*10));
lastFrame = min(350,ceil(finalTime*10));
load ('imageData_35seconds.mat','allImageData');
imageData = allImageData(initFrame:lastFrame);
numFrames = lastFrame - initFrame + 1;
lidarData = cell(numFrames,1);
initFileIndex = floor(initFrame/70) + 1;
lastFileIndex = ceil(lastFrame/70);
frameIndices = [1:70:numFrames numFrames + 1];
counter = 1;
for i = initFileIndex:lastFileIndex
startFrame = frameIndices(counter);
endFrame = frameIndices(counter + 1) - 1;
load(['lidarData_',num2str(i)],'currentLidarData');
lidarData(startFrame:endFrame) = currentLidarData(1:(endFrame + 1 - startFrame));
counter = counter + 1;
end
end