How to create a cell array from rows of an existing cell array?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a cell array named "list" of 900 rows and 9 columns, each element of the cell array contains a string. i want to extract few rows of "list" to create a new cell array. The rows that i need are stored in a vector named "a".
댓글 수: 0
채택된 답변
the cyclist
2018년 1월 3일
new_list = list(a,:);
댓글 수: 2
Stephen23
2018년 1월 3일
편집: Stephen23
2018년 1월 3일
@Miguel Reina: the difference is simple:
- {} curly braces refer to the cell contents.
- () parentheses refer to the cells themselves.
Because you wanted to get a subset of the cell array, all you need is to use parentheses to refer to the cells themselves. Read more in the MATLAB documentation:
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!