Neglect datapoints for a plot

3 visualizaciones (últimos 30 días)
T
T el 18 de Oct. de 2012
Suppose I have this signal that ranges from 2000-7000 seconds and I want to neglect everything after 7000 seconds because it remains a constant value. How would I do this?

Respuesta aceptada

Star Strider
Star Strider el 19 de Oct. de 2012
If you have a time vector t corresponding to your signal vector f:
t_idx = find(t <= 7000);
f1 = f(t_idx);
t1 = t(t_idx);
Using f1 and t1 avoids overwriting your original f and t vectors.
  3 comentarios
Walter Roberson
Walter Roberson el 19 de Oct. de 2012
t_idx = find(t >= 2000 & t <= 7000);
Star Strider
Star Strider el 19 de Oct. de 2012
Thank you, Walter.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB 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