matlab preallocate array size code example Example: matlab preallocate array size x = zeros(1, 1000000);