retime Linear or next
    5 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
I tried to retime my dataset every 10 minutes and I am tying to have it as minutes with Linear (for temperature).
TT2=retime(table_intermediaire,'minutes', linear');
I does works for me as it displays :
"Check for incorrect argument data type or missing argument in call to
function 'retime'."
What would be the command for => minutes and next  for the same datasets ?
0 Kommentare
Antworten (2)
  Star Strider
      
      
 am 2 Dez. 2022
        
      Bearbeitet: Star Strider
      
      
 am 7 Dez. 2022
  
      Try something like this — 
Time = datetime('now')+hours(0:2).';
Temperature = 10*randn(size(Time));
T2 = table(Time,Temperature);                                       % Create 'table'
TT2 = table2timetable(T2)                                           % Create 'timetable'
TT2r = retime(TT2,'regular', 'linear', 'TimeStep',minutes(10))      % Use 'retime'
EDIT — (7 Dec 2022 at 22:16)
The ‘datasets.mat’ file posted later and I didn’t see the update.  
LD = load(websave('datasets','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1216727/datasets.mat'));
table_intermediaire = LD.table_intermediaire
timetable_intermediaire = table2timetable(table_intermediaire);
timetable_intermediairer = retime(timetable_intermediaire,'regular', 'linear', 'TimeStep',minutes(1))       % Use 'retime'
.
0 Kommentare
  Seth Furman
    
 am 7 Dez. 2022
        I should add that if you wanted the new time step to be one minute, then you would want "minutely" instead of "minutes".
load datasets.mat
tt = table2timetable(table_intermediaire)
retime(tt,"minutely","linear")
0 Kommentare
Siehe auch
Kategorien
				Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

