MATLAB: How can I divide the vector into parts

dividesplitvectorvectors

I have a vector (1×65536). 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] (1×65536)
i1 = [153,142,44,55, … , 40] (1×20)
i2 = [144,122,144,655, … , 40] (1×20)
.
.
.
ixx = [44,55,77,22, … , 52] (1×16)

Best Answer

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