MATLAB: Array division

image processing

how to divide a 1D array in 4 equal parts

Best Answer

If you have the Signal Processing Toolbox, you can use buffer()
x = randn(16,1);
y = buffer(x,4);
Otherwise, you can use reshape()
x = randn(16,1);
y = reshape(x,4,4);