フィルターのクリア

deleting the entire line starting from 0,0,0 from a huge text file

1 回表示 (過去 30 日間)
pankti Patel
pankti Patel 2019 年 1 月 31 日
コメント済み: pankti Patel 2019 年 2 月 6 日
I have collected a huge data set and want to clear that dataset.
it is something like this-
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
-0 0 0 0 1 0
-0 0 0 0 1 0
18.2375 202.634 544.567 0 1 0
19.0986 202.448 544.067 0 1 0
19.9764 202.448 544.067 0 1 0
20.8398 202.308 543.692 0 1 0
21.6971 202.122 543.192 0 1 0
22.5579 201.983 542.817 0 1 0
23.4337 201.983 542.817 0 1 0 ........
i only want to keep the points and want to delete each line starting from 0,0,0 or -0,0,0
Can anyone help please?
  2 件のコメント
Luna
Luna 2019 年 1 月 31 日
Is that a double array?
pankti Patel
pankti Patel 2019 年 2 月 6 日
this is my data file.

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

回答 (1 件)

Luna
Luna 2019 年 1 月 31 日
Try this:
A(all((A(:,[1:3]) == [0 0 0])')',:) = [];
Where A is the Nx6 double array from your text file.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by