Not sure what "random matrix" means. John thinks it means values in some random locations, while I think it means values in every location that have a random value. For my assumption, try this:
maxValue = 1000000;
rows = 7;
m = randi(maxValue, rows, rows);
m(logical(eye(rows))) = 0
Best Answer