MATLAB: How to divide an array into sperate vectors.

arraydivisionmatrixseperationvector

i have a 1X1000 array, i want to use the first 4 elements in each iteration in a for loop, so the first iteration first 4, second iteration the next 4 elements and so on.

Best Answer

use reshape() to transform it to 4x250 or 250x4 then loop through row or column