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 Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by