Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
pankti Patel
pankti Patel le 31 Jan 2019
Commenté : pankti Patel le 6 Fév 2019
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 commentaires
Luna
Luna le 31 Jan 2019
Is that a double array?
pankti Patel
pankti Patel le 6 Fév 2019
this is my data file.

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by