I need to cut a vector in a determined intervals. The size of my vector is unknown because it depends on the previous input. Lest say my vector is [2:97] and I need it to be cut in intervals of two (I previously made sure the vector can be divided by three) and all put together in a cell. The result has to be {[2 3 4],[5 6 7],[8 9 10],…,[95 96 97]}. How can I do that?
MATLAB: How to cut a vector in intervals
intervalsMATLABsplittingvector
Best Answer