Delete zero rows from a table

17 ビュー (過去 30 日間)
Jian Teng
Jian Teng 2018 年 6 月 25 日
コメント済み: Paolo 2018 年 6 月 26 日
I have a table in MatLAB. The table has two column, one is called direction, another one is call speed. There are many zeros in the speed column. I would like to delete the row that has 0 in speed. Could anyone help me with that? Thanks!

採用された回答

Paolo
Paolo 2018 年 6 月 25 日
編集済み: Paolo 2018 年 6 月 26 日
For a table named t:
t(~t.speed,:) = []
  3 件のコメント
Jian Teng
Jian Teng 2018 年 6 月 26 日
what is ~ mean?
Paolo
Paolo 2018 年 6 月 26 日
Tilde is the logical NOT operator. ~t.speed is used to find all the rows where t.speed is equal to zero. You can find more information on logical operators in the documentation (link).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by