All pastes #769862 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-11 18:51 UTC
rendered paste body
>> scores = ceil(9 * rand(9, 1000) + 1);
>> M = ones(9, 1000);
>> for k = 1:1000
   	i1 = ceil(9 * rand);
   	j = ceil(8 * rand);
   	i2 = j + (j >= i1);
   	M(i1, k) = 0;
   	M(i2, k) = 0;
   end;
>> N = sort(M .* scores);
>> result = mean(N(3:9, : ));
>> result