need help convertig 10 min data interval to 1 minute data interval

2 visualizaciones (últimos 30 días)
Vidhyashankar V
Vidhyashankar V el 23 de Sept. de 2020
Editada: VBBV el 23 de Sept. de 2020
Hi I have 10 min data interval for windpsedd and ambient temperature , I want to convert it to 1 minute data interval starting from 12:00:00 am all th eway till 11:59 pm . someone help me , how should i proceed with it . Thanks in advance
  2 comentarios
VBBV
VBBV el 23 de Sept. de 2020
Editada: VBBV el 23 de Sept. de 2020
% if true
% code
% end
TT= T(1):minutes(1):T(end) % temperature data vector T
WSS = WS(1):minutes(1):WS(end) % wind speed
VBBV
VBBV el 23 de Sept. de 2020
Editada: VBBV el 23 de Sept. de 2020
% if true
% code
% end
Temp = []; %temperature data 10 min
WS = []; %wind speed data 10 min
time = 00:00:00:minutes(1):24:00:00;
Time = 00:00:00:minutes(10):24:00:00;
temp = interp1(Time,Temp,time);
ws = interp1(Time,WS,time)
If you have Time in am, pm format use datestr
% if true
% code
% end
Time = datestr(Time,'HH:MM:SS');% to 24 hr equivalent

Iniciar sesión para comentar.

Respuestas (2)

KSSV
KSSV el 23 de Sept. de 2020
You need to do interpolation. Read about interp1

Star Strider
Star Strider el 23 de Sept. de 2020
Convert your data to a timetable and use the retime function.
See: Create Timetables for more information.

Categorías

Más información sobre Timetables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by