MATLAB: Text file row-column formatting formattingrow columntext file http://speedy.sh/BTw3z/3d.txt 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..? Best Answer YourData = load('3d.txt');YourData(YourData(:,3) == 0, :) = [];save('New3d.txt', 'YourData', '-ascii'); Related SolutionsMATLAB: Matrix function [row:column] help https://in.mathworks.com/help/matlab/ref/colon.html#description - second example in description explains clearlyWhat you get is simply >> 1:1ans = 1>> MATLAB: Extracting column from text file If you useddata = importdata(TheFileName);then probablydata(:,3) Related QuestionRow/Column Deletion FormattingHow to select odd and even rows from a text fileMatrix row/column augmentationHow can I organize an array removing null elements and keep the same structure
Best Answer