Clear Filters
Clear Filters

Select rows based on a string in a cell

11 views (last 30 days)
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'),:);
But it not works and result is 1x19 cell with empty arrays, is there anything that I'm didn't considered?
Thank you all

Accepted Answer

Star Strider
Star Strider on 12 Aug 2020
Use strcmpi (the case-insensitive version of the function) instead.

More Answers (0)


Find more on Multidimensional Arrays in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!