Borrar filtros
Borrar filtros

select a row in a matrix based on jump in value

2 visualizaciones (últimos 30 días)
Atique Malik
Atique Malik el 24 de Mzo. de 2020
Comentada: Ameer Hamza el 25 de Mzo. de 2020
I have a matrix of data. 9 columns and 5000 rows. The columns represent time series data.
The third column is a variable that comes alive asynchronously. It is an output from a variable that is sampled less frequently than all the others.
I want to keep only those complete rows where this variable changes value.
In practice, the slowly sampled variable is a lab analyser which keeps outputting analogue concentration values which change infrequently. The other variables are temperature readings from an experiment.
Thanks for the help
  1 comentario
Sriram Tadavarty
Sriram Tadavarty el 24 de Mzo. de 2020
Just to get the clarification, you wanted the rows in which third column is alive?

Iniciar sesión para comentar.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 24 de Mzo. de 2020
Try this. Here M is your 5000*9 matrix
idx = [true; diff(M(:,3)) ~=0];
M = M(idx, :);
  2 comentarios
Atique Malik
Atique Malik el 25 de Mzo. de 2020
Thank you. That works!
Ameer Hamza
Ameer Hamza el 25 de Mzo. de 2020
Glad to be of help.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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