Added startTime endTime size match

Added checking of size match for startTime and endTime in Scilab code. A
mismatch will result in a infinite loop.