using the table format, how to filter on words

1 view (last 30 days)
Erik Sund
Erik Sund on 12 Feb 2015
Edited: Erik Sund on 12 Feb 2015
My table looks like this:
Place1 Place2 Place3 ...
A A C
B A A
C C B
C C A
A C A
I want to remove all rows not containing say 'B' and ending up with
Place1 Place2 Place3
B A A
C C B
strcmp(table.Place1,{'B'}) % works in one column
strcmp(table(:,{'Place1','Place2','Place3'}),{'B'}) % returns 0

Answers (0)

Categories

Find more on Tables 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!