Delete rows with certain values while keeping text in column

1 view (last 30 days)
Rogier Busscher
Rogier Busscher on 8 Jun 2017
Commented: KSSV on 9 Jun 2017
I have a large table with data on traffic times and modes. A sample is given below:
Now I would like to remove all rows with a zero. This would be easy to perform on a matrix with something like this:
rows_to_remove = any(data==0, 2);
data(rows_to_remove,:) = [];
However, when I load this table as a matrix, the text data on the travel mode is converted into a numerical value that has no meaning.
How do I remove all rows with a zero while keeping the text in the 5th and 7th column?
KSSV on 9 Jun 2017
Attaching a snapshot of file, wont help. To get full help, attach the file.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!