%% timch.m is designed to check the values of time
%% matrices in the plasma#.m code. Any values less than
%% 0 will have 24 added to them, while any above 24
%% will have 24 subtracted from them. This will allow
%% time vectors to be corrected so that all values are
%% between 0 and 24.
%%
%% Author: Phillip A. Webb
%% Last updated: June 9 2004                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
%%

function tim=timch(tim)

% tim = (input) input time vector
% tim = (output) corrected output time vector

tim(tim<0)=tim(tim<0)+24;                    %correct times below 0
tim(tim>=24)=tim(tim>=24)-24;                %correct times above 24