Dear all, I want to create a matrix including number 0 and 1. but only 10 number 1 in a row. for example:
A=[1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ......]
|but with command dec2bin, the limitation is only to n=20 because if n=25, it's over the memory of computer with this inform "Requested 1073741823×1 (8.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information". | Could we have another way to make this matrix. Thanks
Best Answer