correct array index errors

-- matlab array starts from 1, not 0
draw figure of time, control, and measurement