given cell array 'cell1', create new cell array 'cell2' with elements of cell1 containing string 'f' and ages >=30 && <=40
古いコメントを表示
cell1={'name' 'gender' 'age'; ...
's1' 'f' 25; ...
's2' 'm' 35; ...
's3' 'f' 30; ...
's4' 'm' 22; ...
's5' 'f' 38}
cell2={};
for the conditions given above, cell2 should be:
cell2={'s3' 'f' 30; ...
's5' 'f' 38}
How to I search through cell array cell1 and add rows to cell array cell2 containing string 'f' and ages >=30 && <=40?
I know how to cell2mat or cell2table and work with the matrix -- the problem is that the output should also be a cell array ... so I would like to avoid converting to a matrix or table.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!