How to delete multiple rows of particular values?

조회 수: 4 (최근 30일)
Rachael Courts
Rachael Courts 2020년 5월 20일
댓글: Rachael Courts 2020년 5월 25일
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
James Tursa
James Tursa 2020년 5월 20일
What exactly is your "matrix"? A cell array? A table? Or ...?
Rachael Courts
Rachael Courts 2020년 5월 21일
Hi James,
It's a csv file imported as a table

댓글을 달려면 로그인하십시오.

채택된 답변

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by