How to delete multiple rows of particular values?

4 Ansichten (letzte 30 Tage)
Rachael Courts
Rachael Courts am 20 Mai 2020
Kommentiert: Rachael Courts am 25 Mai 2020
I have a matrix of 56298 x 15. Each column has a different header such as;
'UTC, startSeconds, duration...'
I am wanting to remove entire rows (for all columns) if the 'startSeconds' is equal to or lower than 2.37.
I've tried the 'find' function but I'm concerned that will only delete the value of the cell
  2 Kommentare
James Tursa
James Tursa am 20 Mai 2020
What exactly is your "matrix"? A cell array? A table? Or ...?
Rachael Courts
Rachael Courts am 21 Mai 2020
Hi James,
It's a csv file imported as a table

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Mohammad Sami
Mohammad Sami am 20 Mai 2020
Assuming that the variable is a matrix and the second column is startSeconds
rowstokeep = data(:,2) > 2.37;
data = data(rowstokeep,:);
  3 Kommentare
Rachael Courts
Rachael Courts am 25 Mai 2020
Hi Mohammad,
I attempted what you suggested but keep receiving this error
Rachael Courts
Rachael Courts am 25 Mai 2020
I just worked it out! Sorry Mohammad! Thank-you for your help

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by