How can we plot the same time history plot two times but the second time with a time delay of 2 sec?

 Respuesta aceptada

Más respuestas (1)

Without seeing your current code, it's hard to give a detailed response, but assuming your data is in a timetable, the lag function can be used to shift the time vector by either n timesteps or a time interval dt. Then you can plot that result the same way you're plotting your original dataset.

1 comentario

lag inserts leading NaN and drops trailing entries. That is not what most people would mean by plotting something with a delay.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.

Productos

Versión

R2024a

Preguntada:

el 26 de Oct. de 2025

Comentada:

el 29 de Nov. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by