Problem filtering a table

1 次查看(过去 30 天)
I am trying to filter a table using the following code
raw=readtable("small.xlsx");
p='WSMS, Ashulia';
%loop
A = raw(strcmp(raw( : ,2),p))
but getting the following error.
Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more
subscripts) is not supported. Use a row subscript and a variable subscript.
Can anyone correct me please

采纳的回答

madhan ravi
madhan ravi 2019-9-1
A = raw(strcmp(raw( : ,2),p),:)
% ^

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by