function t_k = tk(t,Ts)
% Returns continuous time T or discrete sample K based on sample time Ts.

%  Copyright 2023 The MathWorks, Inc.
if Ts==0
   t_k = t;
else
   t_k = round(t/abs(Ts));
end