i want to generate ones in consecutive random positions in a vector of zeros for example i want to generate 5 ones in consecutive positions in a specific range lets say from position 5 to position 15 assuming that the vector has 48 positions
MATLAB: I want to generate ones in consecutive random positions in a vector of zeros for example i want to generate 5 ones in consecutive positions in a specific range lets say from position 5 to position 15 assuming that the vector has 48 positions
generate random number of ones in a consecutive positions of vector within specified rangeMATLAB
Best Answer