Find index for mx1 cell with specific string
古いコメントを表示
I have a mx1 cell in A table as Scenario column. I want to find the index matching the string 'Scenario #' using following:
Scenario_list=A.Scenario(Scenario==['Scenario 20']);
Received a "Error using == Matrix dimensions must agree." error message.
採用された回答
その他の回答 (1 件)
Replace
Scenario==['Scenario 20']
with
strcmp(Scenario,'Scenario 20')
If you'd like to ignore case, use strcmpi().
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!