How to delete multiple rows of particular values?

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 commentaires

What exactly is your "matrix"? A cell array? A table? Or ...?
Hi James,
It's a csv file imported as a table

Connectez-vous pour commenter.

 Réponse acceptée

Assuming that the variable is a matrix and the second column is startSeconds
rowstokeep = data(:,2) > 2.37;
data = data(rowstokeep,:);

3 commentaires

For a table you can change the first line
rowstokeep = data.startSeconds > 2.37;
data = data(rowstokeep,:);
Hi Mohammad,
I attempted what you suggested but keep receiving this error
I just worked it out! Sorry Mohammad! Thank-you for your help

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by