MATLAB: Or statement for input arguments of type ‘cell’

or statement

Hi, I want to compare two arguments of cell type which I read as readtable from a csv file (with header). I need to use Or statement but I get error that is not possible to do that.
T=readtable('r.csv')
if strcmp(T.first | T.second , 'NONE')==0
....
end
error: Undefined operator '|' for input arguments of type 'cell'
can you please me help me?

Best Answer

The ismember function should help you out here, or you can use multiple calls to strcmp:
T=readtable('r.csv');
if ~( strcmp(T.first, 'NONE') || ...
strcmp(T.second, 'NONE') )
...
end