Why when I do the cumulative with retime, data don't change?

Hello everyone,
when I use retime for doing the cumulative, values remain the same. (If you see data in 'DATI_ECM_GIORNALIERI' and data in 'Cum_Giu' are exactly the same, despite I used "Cum_Giu = retime(table2timetable(DATIECMWFgiornalieri, 'RowTimes', DTv), 'daily', @(x)sum(x,1,'omitnan'))."
How can I solve this problem?
Thank you.
%CUMULATIVE
load('DATI_ECM_GIORNALIERI')
DTv = datetime(DATIECMWFgiornalieri{:,1:3})
Cum_Giu = retime(table2timetable(DATIECMWFgiornalieri, 'RowTimes', DTv), 'daily', @(x)sum(x,1,'omitnan'))
CTv = Cum_Giu.Properties.RowTimes;
yyaxis right
plot(CTv, Cum_Giu.SMB_mpmm, 'm', 'DisplayName','ECMWF');
yyaxis left
plot(C,NEW, 'DisplayName','AWS')
Ax = gca;
Ax.YAxis(2).Color = 'm';
legend('Location','best')

 Respuesta aceptada

Star Strider
Star Strider el 26 de Ag. de 2021
It does not change because the rows are already daily values, and the retime call summarizes the data by daily values.
.

8 comentarios

And is it possible to do it in another way?
It is not obvious to me that another way exists.
You can do 'monthly', 'yearly', or something else greater than 'daily'. What you do depends on the result you want.
.
Ok, thank you.
I should compare "these cumulative daily " data to others daily data.
My pleasure.
It is best only to compare daily data with other daily data, and preferably in the same or otherwise compatible time ranges.
.
Yes, the time range is the same, but I needed to the cumulative of these daily data.
Note — It may be possible to use the synchronize function to synchronize all of them to a common time vector. That could make the analysis easier, and any statistics more reliable.
.
Thanks for the tip!
As always, my pleasure!
.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

Pul
el 26 de Ag. de 2021

Comentada:

el 26 de Ag. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by