Is there a function similar to "where"?

24 visualizaciones (últimos 30 días)
Tom
Tom el 10 de Feb. de 2023
Comentada: Les Beckham el 13 de Feb. de 2023
For example i am going through a table of data with dates ranging from early 2016 through 2022, every day.
If i only want to extract data from say 2016, is there a way i can say for example:
where date is >= 01/01/2016 & < 01/01/2017
Is there any way of doing this?
Thanks

Respuesta aceptada

Walter Roberson
Walter Roberson el 10 de Feb. de 2023
Editada: Walter Roberson el 11 de Feb. de 2023
  3 comentarios
Walter Roberson
Walter Roberson el 11 de Feb. de 2023
Oh, yes, you are right!
Tom
Tom el 11 de Feb. de 2023
This is exactly what i was looking for, thank you very much

Iniciar sesión para comentar.

Más respuestas (1)

Les Beckham
Les Beckham el 10 de Feb. de 2023
Yes it is called logical indexing.
The exact details depend on what type of data you have. A plain numeric matrix, a table, a cell array?
  2 comentarios
Tom
Tom el 11 de Feb. de 2023
This was also very helpful to look at, thank you.
Les Beckham
Les Beckham el 13 de Feb. de 2023
You are quite welcome.

Iniciar sesión para comentar.

Categorías

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