Select rows based on a string in a cell

7 次查看(过去 30 天)
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
Use strcmpi (the case-insensitive version of the function) instead.

更多回答(0 个)

类别

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

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by