Text file row-column formatting
1 view (last 30 days)
Show older comments
I have this text file, It contains 3 columns. I want to remove all those rows whose third column element is 0...
So, how to do it..?
0 Comments
Accepted Answer
Walter Roberson
on 4 Dec 2012
Edited: Walter Roberson
on 4 Dec 2012
YourData = load('3d.txt');
YourData(YourData(:,3) == 0, :) = [];
save('New3d.txt', 'YourData', '-ascii');
2 Comments
More Answers (0)
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!