Select rows based on a string in a cell

Hello,
I have a 1x19 cell. Each cell looks like this:
I want to store the precip values of WIN in each array. So the output is 1x19 cell with just WIN's precip.
I tried to do it like this:
for i = 1:numel(result_seasonal)
C_WIN{1, i} = result_seasonal{1,i}(strcmp(result_seasonal{1,i}.seasons,'WIN'),:);
end
But it not works and result is 1x19 cell with empty arrays, is there anything that I'm didn't considered?
Thank you all

 採用された回答

Star Strider
Star Strider 2020 年 8 月 12 日

1 投票

Use strcmpi (the case-insensitive version of the function) instead.

2 件のコメント

BN
BN 2020 年 8 月 12 日
Thank you so much
Star Strider
Star Strider 2020 年 8 月 12 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

製品

リリース

R2020a

タグ

質問済み:

BN
2020 年 8 月 12 日

コメント済み:

2020 年 8 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by