Hi Karim,
thanks for your reply, unfortunatelly i do generate the dates over several days:
conf_t = {'27-Jul-2022 14:00:00';'28-Jul-2022 14:00:00';'29-Jul-2022 14:00:00';'30-Jul-2022 14:00:00';'31-Jul-2022 14:00:00'};%
Seq2 = [2 2 4 6 8 10 12 14 16 18 20 4; 2 2 2 2 2 2 2 2 2 2 2 2]; %Sequenz 2 mit den verschiedenen Flüssen + Zeiten in h
start_utc = ((datenum(conf_t) - datenum('01-Jan-1970'))*86400)-7200;
S_utc(:,1) = start_utc(:); % startwert
for k = 1:length(S_utc(:,1))
for i = 1:length(Seq2(1,:)+1)% Utc zeiten gem S1/S2 erzeugen
S_utc(k,i+1) = S_utc(k,i)+Seq2(2,i)*3600;
end
end % Utc Zeiten erzeugen
which makes it not practicable to write this manualy
BUT
your reply brought me to an Idea, an research and the solution
the different kind of brackets/ Type of Data was the problem.
here is the Solution (which works)
xticks(reshape(datetime(conf_t(day_sel):hours(2):datetime(conf_t(day_sel))+hours(24)), 1, []))
(just add the "reshape" function)