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!