How to append time series?

6 visualizaciones (últimos 30 días)
Serbring
Serbring el 18 de Sept. de 2021
Comentada: Image Analyst el 18 de Sept. de 2021
Hi all,
I need to append several timeseries object but I am obtain the following error:
Error using timeseries/append>localConcat (line 57)
The time vectors of the specified time series must be consecutive.
I do not understand what is wrong with the code reported below since the time vector is consecutive and there are no repetitive time. Can you help me?
PrescriptionMap(:,1)=[0 10 30 60 65 85 100];
PrescriptionMap(:,2)=randi([5 40],1,length(PrescriptionMap(:,1)));
PrescriptionMap(:,3)=PrescriptionMap(:,1)/Speed;
for i=1:length(PrescriptionMap(:,1))-1
InputStair(i)=frest.createStep('StepTime',PrescriptionMap(i,1)/Speed,'StepSize',PrescriptionMap(i,1),'FinalTime',PrescriptionMap(i+1)-1)/Speed);
end
InputStairSum=append(InputStair(1),InputStair(2));
Morever, can I transform the data into a double array?
Thank you so much.
Best regards,
Michele
  1 comentario
Image Analyst
Image Analyst el 18 de Sept. de 2021
You didn't give the whole error message, namely the line of code that threw the error (line 57). I have no idea which of the lines in that extracted snippet is line 57.
Also, what is frest.createStep?
And the help says append() concatenates strings, not time series variables.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by