function Time = SdasCreateTimeVector(dataStruct) %% Get parameter start time, end time and time between samples data = dataStruct.getData(); tStart = dataStruct.getTStart().getTimeInMicros(); tEnd = dataStruct.getTEnd().getTimeInMicros(); tbs = (tEnd - tStart) / length(data); %% Get event time and determine the data initial delay Events = dataStruct.getEvents(); tEvent = Events(1).getTimeStamp().getTimeInMicros(); Delay = tStart - tEvent; %% Create time vector Time = (Delay:tbs:(Delay + (length(data) - 1) * tbs))';