Suppose I have this:

v= {1 8 1 1 6 1 2 5 3 2 7 11 7 9 10 9};

How can I mat them as below? ( with array start and end as same number)

v= { [1 8 1] [1 6 1] [2 5 3 2] [7 11 7] [9 10 9] };

Skip to content# MATLAB: How to mat2cell the array

###### Related Question

cell arraycell arrays

Suppose I have this:

v= {1 8 1 1 6 1 2 5 3 2 7 11 7 9 10 9};

How can I mat them as below? ( with array start and end as same number)

v= { [1 8 1] [1 6 1] [2 5 3 2] [7 11 7] [9 10 9] };

- How to separate a column into rows based on the element of a different column
- Select several groups in a Vector
- How to get the number between 2 numbers
- Cell array to vector using cell2mat
- How to Permute the array with specific number
- How to do linear indexing in matlab
- I have to find multiple series of numbers in a single matrix.
- How to randomly swap 2 elements in an array

## Best Answer