how can I divide the vector into parts
조회 수: 26 (최근 30일)
이전 댓글 표시
I have a vector (1x65536). I want to divide this vector at regular intervals. but I failed. Can you help me?
for example
i = [153,142,44,22,55, ... ,52] (1x65536)
i1 = [153,142,44,55, ... , 40] (1x20)
i2 = [144,122,144,655, ... , 40] (1x20)
.
.
.
ixx = [44,55,77,22, ... , 52] (1x16)
댓글 수: 0
채택된 답변
KALYAN ACHARJYA
2021년 1월 19일
편집: KALYAN ACHARJYA
2021년 1월 19일
data_cell=mat2cell(data,1,[20*ones(1,3276),16])
Result, save the all sub array data in cell array having cell elements 3227, where all cell element size is 1x20, except last one, which is 1x16
>> whos data_cell
Name Size Bytes Class Attributes
data_cell 1x3277 ?? cell
Or you may check here
Convert array to cell array with consistently sized cells
추가 답변 (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!