I have following code. It is generating some random values of y (0 or 1). I want it to select at least 2 ones's(1) and it it should never select all zeros (0).
for i=1:W y = randi([0 1]); QTWM2 = round(((1000-500)*(rand(1)))+500); WSCT= y* round(((1500-1000)*(rand(1)))+1000); WCST1(i)=WSCT; QTWM1(i)=QTWM2; f11(i) = y; f1(i)=CFWT*y;end
Please provide me with the solution
Best Answer