Files
uni/second/semester2/CT248/Assignments/Assignment-02/roll_2_dice.m
2023-12-07 01:19:12 +00:00

8 lines
260 B
Matlab

function d = roll_2_dice(N, seed)
% function to roll 2 dice and return the combination of each device row in a vector
rng(seed);
% generating two 1 * N vectors of 6 simulated dice rolls and adding them
d = randi([1 6], 1, N) + randi([1 6], 1, N);
end