How can i generate a table of 6×2 with sum of the row is 10 for example:
0.6 0.4
0.5 0.5
0.7 0.3
i try this way:
r = rand(1, 3); % Start with 3 random numbers that don't sum to 1.
r = r / sum(r) % Normalize so the sum is 1.
however the sum is vertically. How i want to make the sum horizontally?
theSum = sum(r) % Check to make sure. Should be 1
tqvm
Best Answer